Exemplo n.º 1
0
        public void TestStatus_OneUntestedAirConditioner_TestedAirConditionersPercentageShouldBeFifty()
        {
            var commandExecutor = new CommandExecutor();

            commandExecutor.RegisterCarAirConditioner("Toshiba", "B50", 9);
            commandExecutor.RegisterCarAirConditioner("Toshiba2", "B50", 9);
            commandExecutor.TestAirConditioner("Toshiba", "B50");
            var message = commandExecutor.Status();
            var expectedMessage = "Jobs complete: 50.00%";

            Assert.AreEqual(expectedMessage, message, "Status should be zero percent.");
        }
Exemplo n.º 2
0
        public void TestStatus_OneUntestedOfThreeAirConditioners_OutputShouldBeRoundedTwoDecimalPlaces()
        {
            var commandExecutor = new CommandExecutor();

            commandExecutor.RegisterCarAirConditioner("Toshiba", "B50", 9);
            commandExecutor.RegisterCarAirConditioner("Toshiba2", "B50", 9);
            commandExecutor.RegisterCarAirConditioner("Toshiba3", "B50", 9);
            commandExecutor.TestAirConditioner("Toshiba", "B50");
            commandExecutor.TestAirConditioner("Toshiba2", "B50");
            var message = commandExecutor.Status();
            var expectedMessage = "Jobs complete: 66.67%";

            Assert.AreEqual(expectedMessage, message, "Status should be zero percent.");
        }