コード例 #1
0
        public void testUpgraderDoesntAddBedroomToStudios()
        {
            Studio       studio   = new Studio();
            UnitUpgrader upgrader = new UnitUpgrader();

            upgrader.upgrade(studio);

            Assert.Equal(0, studio.numberOfBedrooms);
        }
コード例 #2
0
        public void testUpgraderAddsBedroomToApartment()
        {
            PenthouseSuite penthouse = new PenthouseSuite();
            UnitUpgrader   upgrader  = new UnitUpgrader();

            upgrader.upgrade(penthouse);

            Assert.Equal(5, penthouse.numberOfBedrooms);
        }
コード例 #3
0
        public void testUpgraderIncreasesSquareFootageOfPenthouse()
        {
            PenthouseSuite penthouse = new PenthouseSuite();

            penthouse.setSquareFootage(1500);
            UnitUpgrader upgrader = new UnitUpgrader();

            upgrader.upgrade(penthouse);

            Assert.Equal(1540, penthouse.squareFootage);
        }
コード例 #4
0
        public void testUpgraderIncreasesSquareFootageOfStudio()
        {
            Studio studio = new Studio();

            studio.setSquareFootage(550);
            UnitUpgrader upgrader = new UnitUpgrader();

            upgrader.upgrade(studio);

            Assert.Equal(590, studio.squareFootage);
        }