Namespace: DeltaEngine.Rendering2D.Shapes.Tests
Assembly: DeltaEngine.Rendering2D.Shapes.Tests (in DeltaEngine.Rendering2D.Shapes.Tests.dll) Version: 1.1.1.0 (1.1.1)
Assembly: DeltaEngine.Rendering2D.Shapes.Tests (in DeltaEngine.Rendering2D.Shapes.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Examples
[Test] public void SaveAndLoad() { var data = BinaryDataExtensions.SaveToMemoryStream(Triangle2D.Zero); byte[] savedBytes = data.ToArray(); Assert.AreEqual(1 + 4 + "Triangle2D".Length + Triangle2D.SizeInBytes, savedBytes.Length); Assert.AreEqual("Triangle2D".Length, savedBytes[0]); var reconstructed = data.CreateFromMemoryStream(); Assert.AreEqual(Triangle2D.Zero, reconstructed); }
See Also