public void Test_if_TurnOn_is_correct_input(int power) { //SetUp //Act _uut.TurnOn(power); //Assert _output.Received().OutputLine(Arg.Is <string>(x => x.Contains($"PowerTube works with {power} Watt"))); }
public void PowerTupe_WhenTurnedOff_OutputLineContainsTurnedOff() { sut.TurnOn(10); sut.TurnOff(); var _consoleOutput = readConsole.ToString(); Assert.That(_consoleOutput.Contains("PowerTube turned off")); }
public void TurnOn_CorrectPower() { var output = new StringWriter(); Console.SetOut(output); _powerTube.TurnOn(50); string expectedResult = "PowerTube works with 50\r\n"; Assert.That(output.ToString(), Is.EqualTo(expectedResult)); }
public void TurnOn_WasOff_CorrectOutput() { uut.TurnOn(50); double percent = ((double)50 / 700) * 100; output.Received().OutputLine(Arg.Is <string>(str => str.Contains($"{percent} %"))); }
public void TurnOn_WasOff_CorrectOutput() { // Power forsøges udgivet i procent, derfor omregnes // (100/700)*50 = 7,14, afrundet til 7 uut.TurnOn(50); output.Received().OutputLine(Arg.Is <string>(str => str.Contains("7 %"))); }
public void TurnOn_WasOffCorrectPower_CorrectOutput(int power) { Console.SetOut(consoleOut); powertubeTM.TurnOn(power); Assert.That(consoleOut.ToString().Length > 0); //Equals($"PowerTube works with {power}\r\n")); }
public void TurnOn_WasOffCorrectPower_CorrectOutput(int power) { _uut.TurnOn(power); Assert.That(_stw.ToString, Contains.Substring($"{power}")); }
public void TurnOn_PowerLevelOK_Allowed(int power, string expectedOutput) { _uut.TurnOn(power); Assert.That(_sw.ToString(), Is.EqualTo(expectedOutput)); }
public void TestForTurnOn() { power.TurnOn(50); StringAssert.Contains("PowerTube works with 50", stringWriter.ToString()); }
public void TurnOn_Output_PowerTubeWorksWithPower(int power) { _powertube.TurnOn(power); Assert.That(_stringWriter.ToString().Contains("" + power)); }
public void TurnOn_WasOff_CorrectOutput() { uut.TurnOn(50); }
public void TurnOn_WasOff_CorrectOutput() { uut.TurnOn(50); output.Received().OutputLine(Arg.Is <string>(str => str.Contains("7,1 %"))); }
public void TurnOn_WasOff_CorrectOutput() { uut.TurnOn(50); output.Received().OutputLine(Arg.Is <string>(str => str.Contains("50 W"))); //rettet fra procent til W }
public void TurnOn_WasOff_CorrectOutput() { _powerTube.TurnOn(50); _output.Received().OutputLine(Arg.Is <string>(str => str.Contains("50 W"))); }
public void TurnOn_WasOff_CorrectOutput() { uut.TurnOn(50); output.Received().OutputLine(Arg.Is <string>(str => str.Contains("50 W"))); //Ændret til W i stedet for % }
public void TurnOn() { PT_.TurnOn(50); StringAssert.Contains("PowerTube works with 50", SW_.ToString()); }
public void TurnOff_OutputLine_displays_PowerTubeTurnedOff() { _powerTube.TurnOn(60); _powerTube.TurnOff(); Assert.That(!_stringWriter.ToString().Contains("off")); }
public void PowerTube_TurnOn_WasOffCorrectPower_CorrectOutput(int power) { powertube.TurnOn(power); OutputLineCorrect($"{power}"); }
public void TurnOn_WasOff_CorrectOutput() { uut.TurnOn(350); //Power er blevet sat op fra 50 til 350 watt for at ramme de 50 % output.Received().OutputLine(Arg.Is <string>(str => str.Contains("50 %"))); }
public void TurnOn_WasOff_CorrectOutput() { uut.TurnOn(50); // 50% ud af 700 = 7% (afrundet) output.Received().OutputLine(Arg.Is <string>(str => str.Contains("7 %"))); }
public void PowerTubeIsOff_TurnOn(int power) { sut.TurnOn(power); Assert.That(stringWriter.ToString().Contains($"{power}") && stringWriter.ToString().Contains("PowerTube works")); }
public void TurnOn_WasOff_CorrectOutput() { // Parameter changed from 50 to 350, 50% of 700 is 350 uut.TurnOn(350); output.Received().OutputLine(Arg.Is <string>(str => str.Contains("50 %"))); }
public void TurnOn_WasOffCorrectPower_CorrectOutput(int power) { uut.TurnOn(power); Assert.That(str.ToString().Contains($"PowerTube works with {power}")); }
public void TurnOn_WasOff_CorrectOutput() { uut.TurnOn(50); output.Received().OutputLine(Arg.Is <string>(str => str.Contains("50 watt"))); //fixed - watt not % }
public void TurnOn_WasOffCorrectPower_CorrectOutput(int power) { uut.TurnOn(power); output.Received().OutputLine(Arg.Is <string>(str => str.Contains($"{power}"))); }
public void CookController_PowerTubeAboveLimit_ThrowsExceptionIsCalled(int power, int timer) { Assert.Throws <ArgumentOutOfRangeException>(() => _powerTube.TurnOn(power)); }
public void TurnOn_WasOff_CorrectOutput() { uut.TurnOn(50); output.Received().OutputLine(Arg.Is <string>(str => str.Contains("50 W"))); //Rettelse af 50 % lavet om til 50 W }
public void TurnOn_WasOff_CorrectOutput() { //Da der er ændret i powertube fra procent til watt, skal der ikke stå % tegn uut.TurnOn(50); output.Received().OutputLine(Arg.Is <string>(str => str.Contains("50"))); }