Example #1
0
        public void ExtensionMethod_ToJsonObject()
        {
            var hiveId = new HiveId("content", "my-provider", new HiveIdValue(Guid.NewGuid()));

            var json = hiveId.ToJsonObject();

            Assert.AreEqual(json["htmlId"].ToString(), hiveId.GetHtmlId());
            Assert.AreEqual(json["rawValue"].ToString(), hiveId.ToString());
            Assert.AreEqual(json["value"].ToString(), hiveId.Value.Value.ToString());
            Assert.AreEqual(json["valueType"].ToString(), ((int)hiveId.Value.Type).ToString(CultureInfo.InvariantCulture));
            Assert.AreEqual(json["provider"].ToString(), hiveId.ProviderId);
            Assert.AreEqual(json["scheme"].ToString(), hiveId.ProviderGroupRoot.ToString());
        }
Example #2
0
        public void ExtensionMethod_ToJsonObject()
        {
            var hiveId = new HiveId("content", "my-provider", new HiveIdValue(Guid.NewGuid()));

            var json = hiveId.ToJsonObject();

            Assert.AreEqual(json["htmlId"].ToString(), hiveId.GetHtmlId());
            Assert.AreEqual(json["rawValue"].ToString(), hiveId.ToString());
            Assert.AreEqual(json["value"].ToString(), hiveId.Value.Value.ToString());
            Assert.AreEqual(json["valueType"].ToString(), ((int)hiveId.Value.Type).ToString(CultureInfo.InvariantCulture));
            Assert.AreEqual(json["provider"].ToString(), hiveId.ProviderId);
            Assert.AreEqual(json["scheme"].ToString(), hiveId.ProviderGroupRoot.ToString());
        }