-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed explicit target frameworks and created .Net Standard 2.0 instead
- Loading branch information
Showing
24 changed files
with
167 additions
and
563 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+60 Bytes
(100%)
Arci.Networking.Tests.UAP/Arci.Networking.Tests.UAP_TemporaryKey.pfx
Binary file not shown.
42 changes: 42 additions & 0 deletions
42
Arci.Networking.Tests.UAP/BuilderTests/PacketBuilderTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using Arci.Networking.Data; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using System; | ||
using System.Linq; | ||
|
||
namespace Arci.Networking.Tests.UAP.BuilderTests | ||
{ | ||
[TestClass] | ||
public class PacketBuilderTests | ||
{ | ||
[TestMethod] | ||
public void TestPacketBuild() | ||
{ | ||
var buildedPacket = new Packet(0).Builder() | ||
.WriteBit(false).WriteBit(true).WriteBit(9).FlushBits() | ||
.WriteGuidBitStreamInOrder(123456, 1, 2, 3, 4, 5, 6, 7, 0) | ||
.Write((byte)1).Write((UInt16)2).Write((UInt32)3).Write((sbyte)4).Write((Int16)5).Write(6) | ||
.Write(new byte[] { 7, 8, 9 }) | ||
.WriteGuidByteStreamInOrder(123456, 1, 2, 3, 4, 5, 6, 7, 0) | ||
.Build(); | ||
|
||
var packet = new Packet(0); | ||
packet.WriteBit(false); | ||
packet.WriteBit(true); | ||
packet.WriteBit(9); | ||
packet.FlushBits(); | ||
packet.WriteGuidBitStreamInOrder(123456, 1, 2, 3, 4, 5, 6, 7, 0); | ||
packet.Write((byte)1); | ||
packet.Write((UInt16)2); | ||
packet.Write((UInt32)3); | ||
packet.Write((sbyte)4); | ||
packet.Write((Int16)5); | ||
packet.Write(6); | ||
packet.Write(new byte[] { 7, 8, 9 }); | ||
packet.WriteGuidByteStreamInOrder(123456, 1, 2, 3, 4, 5, 6, 7, 0); | ||
|
||
Assert.IsTrue(buildedPacket.Data.SequenceEqual(packet.Data)); | ||
buildedPacket.Dispose(); | ||
packet.Dispose(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.