Пример #1
0
        public void Fire_FirstMatchingFactSecondInvalid_DoesNotFire()
        {
            //Arrange
            var fact1 = new FactType4 {TestProperty = "Valid Value 1"};
            var fact2 = new FactType4 {TestProperty = "Valid Value 2"};

            Session.Insert(fact1);
            Session.Insert(fact2);

            //Act
            Session.Fire();

            //Assert
            AssertDidNotFire();
        }
Пример #2
0
        public void Fire_MatchingFacts_FiresOnce()
        {
            //Arrange
            var fact1 = new FactType4 {TestProperty = "Valid Value 1"};
            var fact2 = new FactType4 {TestProperty = "Valid Value 2", Parent = fact1};
            var fact3 = new FactType4 {TestProperty = "Invalid Value 3", Parent = fact1};
            var fact4 = new FactType4 {TestProperty = "Valid Value 4", Parent = null};

            Session.Insert(fact1);
            Session.Insert(fact2);
            Session.Insert(fact3);
            Session.Insert(fact4);

            //Act
            Session.Fire();

            //Assert
            AssertFiredOnce();
        }