Ejemplo n.º 1
0
        public void AssertWasCalled_should_set_IsAssertion_to_true_of_recorded_rule()
        {
            var config = new FakeConfiguration(this.fake, new RecordedCallRule(A.Fake <MethodInfoManager>()));

            config.AssertWasCalled(x => true);

            Assert.That(((RecordedCallRule)config.RuleBeingBuilt).IsAssertion, Is.True);
        }
Ejemplo n.º 2
0
        public void AssertWasCalled_should_set_repeat_predicate_to_the_recorded_rule()
        {
            Func <int, bool> repeatPredicate = x => true;
            var config = new FakeConfiguration(this.fake, new RecordedCallRule(A.Fake <MethodInfoManager>()));

            config.AssertWasCalled(repeatPredicate);

            Assert.That(((RecordedCallRule)config.RuleBeingBuilt).RepeatPredicate, Is.SameAs(repeatPredicate));
        }