예제 #1
0
        public void FillingAFullCupOverflows()
        {
            var cup = new Cup();

            cup.Fill();
            Assert.Throws <OverflowException>(() => cup.Fill());
            Assert.IsTrue(cup.IsEmpty);
        }
예제 #2
0
        public void AFilledCupIsNotEmpty()
        {
            var cup = new Cup();

            cup.Fill();
            Assert.IsFalse(cup.IsEmpty);
        }
예제 #3
0
        public void DrinkingFromAFullCupEmptiesIt()
        {
            var cup = new Cup();

            cup.Fill();
            cup.Drink();
            Assert.IsTrue(cup.IsEmpty);
        }