public class SchoolbusFixture : ExperimentOn<Schoolbus>
    {
        [Test]
        public void CanTransportKids()
        {
            Expecting(ThatTheCollection(x => x.Tires).Has.CountOf(Schoolbus.RequiredFunctioningTires).Always(),
                ThatTheCollection(x => x.Tires).Has.No.ItemsSatisfying(y => y.Punctured) //
                    .AndLater.Has.AtLeast(2).ItemsSatisfying(y => y.Punctured),
                That(x => x.CanTransportKids()).WillChangeTo(false));

            Try(x => x.Tires.First().Punctured = true);
        }

        protected override Schoolbus TestSubjectFactory()
        {
            return new Schoolbus();
        }
    }

Last edited Feb 11, 2011 at 11:24 PM by MarkKnell, version 1

Comments

No comments yet.