Пример #1
0
 public void WritesSequentially()
 {
     var builder = new BufferBuilder();
     builder.WriteByte(3);
     builder.WriteString("ABC");
     builder.WriteShort(2);
     builder.WriteLong(8);
     Assert.That(builder.ToArray(), new EqualConstraint(new[] {3, 65, 66, 67, 0, 2, 0, 8, 0, 0, 0}));
 }
Пример #2
0
 public void WritesByte()
 {
     var builder = new BufferBuilder();
     builder.WriteByte(32);
     Assert.That(builder.ToArray(), new EqualConstraint(new[] { 32 }));
 }