Exemple #1
0
        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);
        }
Exemple #2
0
 static string NewId(string input, params object[] args)
 {
     return(KeyFormat.FromString(input).Compile <object>(args));
 }
Exemple #3
0
        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");
        }
Exemple #4
0
 public void BugShouldNotAllowPrefixOnGuids()
 {
     Should.Throw <Exception>(() => new Id <object>(KeyFormat.FromString(""), "hest-21952ee6-d028-433f-8634-94d6473275f0"));
 }