using skyscraper5.Docsis.MacManagement;
using System.Net.NetworkInformation;
using skyscraper8.Tests.Properties;

namespace skyscraper8.Tests
{
	public class RangingResponseTest
	{
		[Fact]
		public void OffsetBreakerTest()
		{

			byte[] blob = Resources.ranging_response_test;
			Random rng = new Random();
			
			byte[] sourceMacBuffer = new byte[6];
			rng.NextBytes(sourceMacBuffer);
			PhysicalAddress sourceAddress = new PhysicalAddress(sourceMacBuffer);

			byte[] targetMacBuffer = new byte[6];
			rng.NextBytes(targetMacBuffer);
			PhysicalAddress targetAddress = new PhysicalAddress(targetMacBuffer);

			RangingResponse rangingResponse = new RangingResponse(sourceAddress, targetAddress, blob);
			Assert.True(rangingResponse.Valid);
		}
	}
}
