public void New_ByteEquals_ToString_Equals() { for (int i = 0; i < 100; i++) { { var ulid = Ulid.NewUlid(); var nulid = new NUlid.Ulid(ulid.ToByteArray()); ulid.ToByteArray().Should().BeEquivalentTo(nulid.ToByteArray()); ulid.ToString().Should().Be(nulid.ToString()); ulid.Equals(ulid).Should().BeTrue(); ulid.Equals(Ulid.NewUlid()).Should().BeFalse(); } { var nulid = NUlid.Ulid.NewUlid(); var ulid = new Ulid(nulid.ToByteArray()); ulid.ToByteArray().Should().BeEquivalentTo(nulid.ToByteArray()); ulid.ToString().Should().Be(nulid.ToString()); ulid.Equals(ulid).Should().BeTrue(); ulid.Equals(Ulid.NewUlid()).Should().BeFalse(); } } }
public bool Ulid_() { return(ulid.Equals(ulid)); }