diff --git a/test/by/By.WriteAndRead.cs b/test/by/By.WriteAndRead.cs index aca0a0f..5250436 100644 --- a/test/by/By.WriteAndRead.cs +++ b/test/by/By.WriteAndRead.cs @@ -1,4 +1,5 @@ using System; +using System.Net.Sockets; using System.Numerics; using Byter; using Xunit; @@ -279,14 +280,32 @@ public void ByBigInteger() Assert.True(b.IsValid); } - [Fact(Skip = "Enum")] + [Fact] public void ByEnum() { + By b = new By(); + + b.Add(SocketType.Unknown); + b.Add(SocketType.Stream); + b.Add(SocketType.Dgram); + b.Add(SocketType.Raw); + b.Add(SocketType.Rdm); + b.Add(SocketType.Seqpacket); + + Assert.Equal(SocketType.Unknown, b.Get()); + Assert.Equal(SocketType.Stream, b.Get()); + Assert.Equal(SocketType.Dgram, b.Get()); + Assert.Equal(SocketType.Raw, b.Get()); + Assert.Equal(SocketType.Rdm, b.Get()); + Assert.Equal(SocketType.Seqpacket, b.Get()); + + Assert.True(b.IsValid); } [Fact(Skip = "TODO")] public void ByArray() { + } [Fact(Skip = "TODO")]