public void GetIdValue_WhenNullAssignedNullableGuidOnFirstLevel_ReturnsNull()
        {
            var item = new NullableGuidOnRoot { StructureId = null };
            var property = StructurePropertyTestFactory.GetPropertyByPath<NullableGuidOnRoot>("StructureId");

            var actual = property.GetValue(item);

            Assert.IsNull(actual);
        }
        public void GetIdValue_WhenNullableGuidOnFirstLevel_ReturnsGuid()
        {
            var expected = Guid.Parse("4217F3B7-6DEB-4DFA-B195-D111C1297988");
            var item = new NullableGuidOnRoot { StructureId = expected };
            var property = StructurePropertyTestFactory.GetPropertyByPath<NullableGuidOnRoot>("StructureId");

            var actual = property.GetValue(item);

            Assert.AreEqual(expected, actual);
        }
Example #3
0
        public void GetIdValue_WhenNullAssignedNullableGuidOnFirstLevel_ReturnsNull()
        {
            var item = new NullableGuidOnRoot {
                StructureId = null
            };
            var property = StructurePropertyTestFactory.GetPropertyByPath <NullableGuidOnRoot>("StructureId");

            var actual = property.GetValue(item);

            Assert.IsNull(actual);
        }
Example #4
0
        public void GetIdValue_WhenNullableGuidOnFirstLevel_ReturnsGuid()
        {
            var expected = Guid.Parse("4217F3B7-6DEB-4DFA-B195-D111C1297988");
            var item     = new NullableGuidOnRoot {
                StructureId = expected
            };
            var property = StructurePropertyTestFactory.GetPropertyByPath <NullableGuidOnRoot>("StructureId");

            var actual = property.GetValue(item);

            Assert.AreEqual(expected, actual);
        }