コード例 #1
0
ファイル: IdTests.cs プロジェクト: tthtun/Cirqus
        public void ParsingSGuidToSGuid()
        {
            var sguid = KeyFormat.ToSGuid(Guid.Parse("21952ee6-d028-433f-8634-94d6473275f0"));

            var id = new Id <object>(KeyFormat.FromString("prefix-sguid"), "prefix-" + sguid);

            id.ToString().ShouldBe("prefix-" + sguid);
        }
コード例 #2
0
ファイル: IdTests.cs プロジェクト: tthtun/Cirqus
 static string NewId(string input, params object[] args)
 {
     return(KeyFormat.FromString(input).Compile <object>(args));
 }
コード例 #3
0
ファイル: IdTests.cs プロジェクト: tthtun/Cirqus
        public void ParsingGuidToGuid()
        {
            var id = new Id <object>(KeyFormat.FromString("prefix-guid"), "prefix-21952ee6-d028-433f-8634-94d6473275f0");

            id.ToString().ShouldBe("prefix-21952ee6-d028-433f-8634-94d6473275f0");
        }
コード例 #4
0
ファイル: IdTests.cs プロジェクト: tthtun/Cirqus
 public void BugShouldNotAllowPrefixOnGuids()
 {
     Should.Throw <Exception>(() => new Id <object>(KeyFormat.FromString(""), "hest-21952ee6-d028-433f-8634-94d6473275f0"));
 }