public void TestBufferRoundTrip() { var marshalled = BinaryHelpers.MarshalStruct(BenchmarkStructure); var unmarshalledStructure = BinaryHelpers.BufferToStructure <SimpleStructure>(marshalled); Assert.AreEqual(BenchmarkStructure.StringValue, unmarshalledStructure.StringValue); Assert.AreEqual(BenchmarkStructure.IntValue, unmarshalledStructure.IntValue); Assert.AreEqual(BenchmarkStructure.FloatValue, unmarshalledStructure.FloatValue); CollectionAssert.AreEqual(BenchmarkStructure.ByteArray, unmarshalledStructure.ByteArray); }