Esempio n. 1
0
        public void GetFieldValue_ContainsGuid_ReturnsID()
        {
            //Arrange
            string fieldValue = "F55E52AC-A555-4E4D-BCD5-78F37FB1CEB1";
            var    mapper     = new SitecoreFieldIdMapper();

            //Act
            var result = mapper.GetFieldValue(fieldValue, null, null);

            //Assert
            Assert.AreEqual(new ID(fieldValue), result);
            Assert.IsTrue(result is ID);
        }
Esempio n. 2
0
        public void GetFieldValue_ContainsNull_ReturnsIDNull()
        {
            //Arrange
            string fieldValue = null;
            var    mapper     = new SitecoreFieldIdMapper();

            //Act
            var result = mapper.GetFieldValue(fieldValue, null, null);

            //Assert
            Assert.AreEqual(ID.Null, result);
            Assert.IsTrue(result is ID);
        }