public void HiveEntityUri_ParseFromString_ExposesSchemeAndProvider() { var id = HiveEntityUri.Parse("content://provider-name/5"); Assert.AreEqual(id.HiveEntityType, "content"); Assert.AreEqual(id.HiveOwnerProvider, "provider-name"); Assert.AreEqual(id.SerializationType, DataSerializationTypes.LargeInt); Assert.AreEqual(id.AsInt, 5); }
public void HiveEntityUri_Equals_ToString_With_String_Serialization() { var id = new HiveEntityUri("TemplatePath/TemplateName.cshtml"); var id2 = new HiveEntityUri("Home-Page.cshtml"); var output = id.ToString(); var output2 = id2.ToString(); Assert.AreEqual("TemplatePath/TemplateName.cshtml", HiveEntityUri.Parse(output.FromUrlBase64()).GetAllStringParts()); Assert.AreEqual("Home-Page.cshtml", HiveEntityUri.Parse(output2.FromUrlBase64()).GetAllStringParts()); }