BinaryDataLoadSaveTests WriteAndReadNumberMostlyBelow255ThatIsReallyBelow255 Method Delta Engine Documentation

Namespace: DeltaEngine.Tests.Core
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void WriteAndReadNumberMostlyBelow255ThatIsReallyBelow255()
Examples

[Test]
public void WriteAndReadNumberMostlyBelow255ThatIsReallyBelow255()
{
    var data = new MemoryStream();
    var writer = new BinaryWriter(data);
    const int NumberBelow255 = 123456;
    writer.WriteNumberMostlyBelow255(NumberBelow255);
    data.Position = 0;
    var reader = new BinaryReader(data);
    Assert.AreEqual(NumberBelow255, reader.ReadNumberMostlyBelow255());
}
See Also