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); }
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); }
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); }