Convert() 공개 메소드

public Convert ( object source ) : string
source object
리턴 string
 public void TestReuseRolledValues()
 {
     var sut = new RollingGuidValueConverter();
     Guid g1 = Guid.NewGuid();
     Guid g2 = Guid.NewGuid();
     Assert.AreEqual("00000000-0000-0000-0000-000000000001", sut.Convert(g1));
     Assert.AreEqual("00000000-0000-0000-0000-000000000002", sut.Convert(g2));
     Assert.AreEqual("00000000-0000-0000-0000-000000000001", sut.Convert(g1));
     Assert.AreEqual("00000000-0000-0000-0000-000000000002", sut.Convert(g2));
 }
 public void TestRolling()
 {
     var sut = new RollingGuidValueConverter();
     Assert.AreEqual("00000000-0000-0000-0000-000000000001", sut.Convert(Guid.NewGuid()));
     Assert.AreEqual("00000000-0000-0000-0000-000000000002", sut.Convert(Guid.NewGuid()));
     Assert.AreEqual("00000000-0000-0000-0000-000000000003", sut.Convert(Guid.NewGuid()));
     Assert.AreEqual("00000000-0000-0000-0000-000000000004", sut.Convert(Guid.NewGuid()));
     Assert.AreEqual("00000000-0000-0000-0000-000000000005", sut.Convert(Guid.NewGuid()));
     Assert.AreEqual("00000000-0000-0000-0000-000000000006", sut.Convert(Guid.NewGuid()));
     Assert.AreEqual("00000000-0000-0000-0000-000000000007", sut.Convert(Guid.NewGuid()));
     Assert.AreEqual("00000000-0000-0000-0000-000000000008", sut.Convert(Guid.NewGuid()));
     Assert.AreEqual("00000000-0000-0000-0000-000000000009", sut.Convert(Guid.NewGuid()));
     Assert.AreEqual("00000000-0000-0000-0000-000000000010", sut.Convert(Guid.NewGuid()));
 }