Exemple #1
0
 public void TestHexadecimalRoundtrip()
 {
     Oid a = Oid.NewOid();
     string val = a.ToHexadecimalString();
     string val2 = a.ToString("h", null);
     val.Should().Be(val2);
     Oid b = new Oid(val, "h");
     Oid c = new Oid(val);
     b.Should().Be(a);
     b.Should().Be(c);
 }
Exemple #2
0
 public void TestMongoDBRoundtrip()
 {
     Oid a = Oid.NewOid();
     string val = a.ToMongoDBString();
     string val2 = a.ToString("m", null);
     val.Should().Be(val2);
     Oid b = new Oid(val, "m");
     b.Should().Be(a);
 }
Exemple #3
0
 public void TestBase64Roundtrip()
 {
     Oid a = Oid.NewOid();
     string val = a.ToBase64String();
     string val2 = a.ToString("b", null);
     val.Should().Be(val2);
     Oid b = new Oid(val, "b");
     b.Should().Be(a);
 }