コード例 #1
0
        public void PropertyContext_IsVisible_Found_Test()
        {
            var target = new PropertyContext(null);

            target.SetProperty("Test", 1, PropertyTypeOptions.Visible);

            const bool expected = true;
            var        actual   = target.IsVisible("Test");

            actual.Should().Be(expected);
        }
コード例 #2
0
        public void PropertyContext_IsVisible_NotFound_Test()
        {
            var target = new PropertyContext(null);

            target.SetProperty("Test", 1);

            const bool expected = false;
            var        actual   = target.IsVisible("Tester");

            actual.Should().Be(expected);
        }
コード例 #3
0
        public void IsVisible_False_Fact()
        {
            var fake = new FakeEntity(1, "Fact");

            var ctx = new PropertyContext(fake);

            ctx.SetProperty(FactEnum.Fact1, "Nothing");

            var result = ctx.IsVisible("Fact1");

            result.Should().BeFalse();
        }