21 lines
500 B
C#
21 lines
500 B
C#
|
using IPMeow.Lib;
|
||
|
using Xunit;
|
||
|
|
||
|
namespace IPMeow.Test;
|
||
|
|
||
|
public class StructTests
|
||
|
{
|
||
|
[Fact]
|
||
|
public void MacAddressSerializationTest()
|
||
|
{
|
||
|
var addrFromString = new MacAddress("fe:ed:de:ad:be:ef");
|
||
|
var addrFromBytes = new MacAddress(new byte[] { 0xfe, 0xed, 0xde, 0xad, 0xbe, 0xef });
|
||
|
|
||
|
Assert.Equal(addrFromString, addrFromBytes);
|
||
|
|
||
|
string addrString = addrFromBytes.ToString();
|
||
|
|
||
|
Assert.Equal("fe:ed:de:ad:be:ef", addrString);
|
||
|
}
|
||
|
}
|