示例#1
0
 public void BufferTest()
 {
     DBBinary target;
     byte[] buffer = new byte[] { 1, 2, 1, 2, 12, 2, 2 };
     target = new DBBinary(BinaryType.Binary, buffer);
     target.Buffer.ToDashedHexString().Should().Be(buffer.ToDashedHexString());
 }
示例#2
0
 public void DBBinaryConstructorTest()
 {
     DBBinary target;
     target = new DBBinary(BinaryType.Binary, new byte[] { 1, 2, 1, 2, 12, 2, 2 });
     target = new DBBinary(BinaryType.Function, new byte[] { 1, 2, 1, 2, 12, 2, 2 });
     target = new DBBinary(BinaryType.MD5, new byte[] { 1, 2, 1, 2, 12, 2, 2 });
     target = new DBBinary(BinaryType.UserDefined, new byte[] { 1, 2, 1, 2, 12, 2, 2 });
     target = new DBBinary(BinaryType.UUID, new byte[] { 1, 2, 1, 2, 12, 2, 2 });
 }
 void element_binary(string name, DBBinary val)
 {
     element_type(TypeByte.BINARY);
     element_name(name);
     base.Write(val.Buffer.Length);
     base.Write((byte)val.Type);
     base.Write(val.Buffer);
 }
示例#4
0
 public void TypeTest()
 {
     DBBinary target;
     target = new DBBinary(BinaryType.Binary, new byte[] { 1, 2, 1, 2, 12, 2, 2 });
     target.Type.Should().Be(BinaryType.Binary);
 }