forked from CosmosOS/Cosmos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ARPRequestTests.cs
47 lines (42 loc) · 1.79 KB
/
ARPRequestTests.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//using ApprovalTests;
//using ApprovalTests.Reporters;
//using Cosmos.HAL.Network;
//using Cosmos.System.Network.IPv4;
//using Cosmos.System.VSTests;
//using Microsoft.VisualStudio.TestTools.UnitTesting;
//namespace Cosmos.System.Tests
//{
// [TestClass]
// public class ARPRequestTests
// {
// [TestMethod]
// [UseReporter(typeof(DiffReporter))]
// public void EnsureEncodedCorrectly()
// {
// var xMacSender = new MACAddress(new byte[]
// {
// 00,
// 0x50,
// 0x56,
// 0xc0,
// 0x00,
// 0x01
// });
// var xIPSender = new Address(192, 168, 17, 1);
// var xMacTarget = MACAddress.Broadcast;
// var xIPTarget = new Address(192, 168, 17, 102);
// var xArpTargetMac = new MACAddress(new byte[6]);
// var xPacket = new ARPRequest_Ethernet(xMacSender, xIPSender, xMacTarget, xIPTarget, xArpTargetMac);
// var xExpectedPacket =
// "FF FF FF FF FF FF 00 50 " +
// "56 C0 00 01 08 06 00 01 " +
// "08 00 06 04 00 01 00 50 " +
// "56 C0 00 01 C0 A8 11 01 " +
// "00 00 00 00 00 00 C0 A8 " +
// "11 66";
// Approvals.Verify(Utilities.PrettyPrint(xPacket.RawData));
// //Approvals.VerifyBinaryFile(xPacket.RawData, "bin");
// //Assert.AreEqual(xExpectedPacket, Utilities.PrettyPrint(xPacket.RawData));
// }
// }
//}