Exemple #1
0
        public void PropertyContext_GetPropertyBits_NotFound_Test()
        {
            var target = new PropertyContext(null);

            target.SetProperty("Test", 1);

            var actual = target.GetPropertyBits("Tester");

            actual.Should().BeEmpty();
        }
Exemple #2
0
        public void PropertyContext_GetPropertyBits_Found_Test()
        {
            var target = new PropertyContext(null);

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

            const string expected = "pvi";
            var          actual   = target.GetPropertyBits("Test");

            actual.Should().Be(expected);
        }
Exemple #3
0
        public void GetPropertyBits_Fact(PropertyTypeOptions options, string expectedValue)
        {
            var fake = new FakeEntity(1, "Fact");

            var ctx = new PropertyContext(fake);

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

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

            result.Should().Be(expectedValue);
        }