コード例 #1
0
 public void DescribesItselfOnWriter()
 {
     var state = new FakeStatePredicate();
     state.description = "Fake Predicate";
     var inStateOrdering = new InStateOrderingConstraint(state);
     Assert.That(StringDescription.Describe(inStateOrdering),
                NUnit.Framework.Is.EqualTo("when Fake Predicate"));
 }
コード例 #2
0
        public void AllowsInvocationWhenStateIsActive()
        {
            var state = new FakeStatePredicate();
            state.isActive = true;
            var inStateOrdering = new InStateOrderingConstraint(state);
            Assert.That(inStateOrdering.AllowsInvocationNow());

            state.isActive = false;
            Assert.IsFalse(inStateOrdering.AllowsInvocationNow());
        }