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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }