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"));
 }
        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());
        }