Exemplo n.º 1
0
        public void another_person_cannot_Drink_from_the_same_Cup()
        {
            var c = new Cup();

            c.Fill();
            c.Drink(4, new Person());
            c.Drink(3, new Person());
        }
Exemplo n.º 2
0
        public void cannot_Drink_more_than_available_quantity()
        {
            var p = new Person();

            var c = new Cup();

            c.Fill();
            c.Drink(4, p);
            c.Drink(8, p);
        }
Exemplo n.º 3
0
        public void another_person_cannot_Drink_from_the_same_Cup_even_if_emptied()
        {
            var c = new Cup();

            c.Fill();
            c.Drink(4, new Person());
            c.Empty();
            c.Fill();
            c.Drink(3, new Person());
        }
Exemplo n.º 4
0
        public void Drink_more_times_leaves_correct_quantity_in_Cup()
        {
            var p = new Person();

            var c = new Cup();

            c.Fill();
            c.Drink(3, p);
            c.Drink(6, p);
            Assert.AreEqual(1, c.Quantity);
        }
Exemplo n.º 5
0
        public void a_washed_Cup_can_be_drunk_by_another_person()
        {
            var c = new Cup();

            c.Fill();

            c.Drink(3, new Person());

            c.Wash();

            c.Fill();

            c.Drink(7, new Person());
        }
Exemplo n.º 6
0
        public void null_Person_cannot_drink()
        {
            var c = new Cup();

            c.Fill();
            c.Drink(1, null);
        }
Exemplo n.º 7
0
        public void Drink_leaves_correct_quantity_in_Cup()
        {
            var c = new Cup();

            c.Fill();
            c.Drink(3, new Person());
            Assert.AreEqual(7, c.Quantity);
        }
Exemplo n.º 8
0
        public void Empty_post_Drink_empties_the_Cup()
        {
            var c = new Cup();

            c.Fill();
            c.Drink(4, new Person());
            c.Empty();
            Assert.AreEqual(0, c.Quantity);
        }
Exemplo n.º 9
0
        public void two_Cups_can_be_drunk_by_two_different_people()
        {
            var c1 = new Cup();

            c1.Fill();
            var p1 = new Person();

            var c2 = new Cup();

            c2.Fill();
            var p2 = new Person();

            c1.Drink(5, p1);
            c2.Drink(2, p2);

            Assert.AreEqual(5, c1.Quantity);
            Assert.AreEqual(8, c2.Quantity);
        }
Exemplo n.º 10
0
        public void cannot_Drink_from_an_empty_Cup()
        {
            var c = new Cup();

            c.Drink(5, new Person());
        }