Exemplo n.º 1
0
        public void IsRipeAtOutOfRangeTest()
        {
            // arrange
            TomatoeBox tomatoeBox = new TomatoeBox(4);

            tomatoeBox.RipeAt(0);

            // assert
            Assert.AreEqual(false, tomatoeBox.IsRipeAt(-1));
            Assert.AreEqual(false, tomatoeBox.IsRipeAt(4));
        }
Exemplo n.º 2
0
        public void IsRipeAtTest()
        {
            // arrange
            TomatoeBox tomatoeBox = new TomatoeBox(7);

            tomatoeBox.RipeAt(0);
            tomatoeBox.RipeAt(2);
            tomatoeBox.RipeAt(6);

            // Act as parameter 2 in assert

            // Assert
            Assert.AreEqual(true, tomatoeBox.IsRipeAt(0));
            Assert.AreEqual(false, tomatoeBox.IsRipeAt(1));
            Assert.AreEqual(true, tomatoeBox.IsRipeAt(2));
            Assert.AreEqual(false, tomatoeBox.IsRipeAt(3));
            Assert.AreEqual(false, tomatoeBox.IsRipeAt(4));
            Assert.AreEqual(false, tomatoeBox.IsRipeAt(5));
            Assert.AreEqual(true, tomatoeBox.IsRipeAt(6));
        }