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