public void TurnOff_WasOn_CorrectOutput() { powertubeTM.TurnOn(50); //unless powertube IsOn=true; no action/output on TurnOff() Console.SetOut(consoleOut); powertubeTM.TurnOff(); Assert.That(consoleOut.ToString().Length > 0); //Equals($"PowerTube turned off")); }
public void TurnOff_PowerTubeIsOff() { var output = new StringWriter(); Console.SetOut(output); _powerTube.TurnOff(); string expectedResult = ""; Assert.That(output.ToString(), Is.EqualTo(expectedResult)); }
public void TurnOff_IsAlreadyOn_Allowed() { _uut.TurnOn(100); _sw.GetStringBuilder().Clear(); _uut.TurnOff(); Assert.That(() => _sw.ToString(), Is.EqualTo("PowerTube turned off\r\n")); }
public void Test_if_TurnOf_works(int power) { //SetUp _uut.TurnOn(power); //Act _uut.TurnOff(); //Assert _output.Received().OutputLine(Arg.Is <string>(x => x.Contains("PowerTube turned off"))); }
public void PowerTupe_WhenTurnedOff_OutputLineContainsTurnedOff() { sut.TurnOn(10); sut.TurnOff(); var _consoleOutput = readConsole.ToString(); Assert.That(_consoleOutput.Contains("PowerTube turned off")); }
public void TurnOff_WasOn_CorrectOutput() { uut.TurnOn(50); uut.TurnOff(); output.Received().OutputLine(Arg.Is <string>(str => str.Contains("off"))); }
public void PowerTubeIsOn_TurnOffCorrectly() { sut.TurnOn(50); sut.TurnOff(); Assert.That(stringWriter.ToString().Contains("turned off")); }
public void TurnOff_WasOn_CorrectOutput() { _uut.TurnOn(50); _uut.TurnOff(); Assert.That(_stw.ToString, Contains.Substring("off")); }
public void TestForTurnOnTurnOff() { power.TurnOn(50); power.TurnOff(); StringAssert.Contains("PowerTube turned off", stringWriter.ToString()); }
public void TurnOn_TurnOff_Output_PowerTubeTurnedOff() { _powertube.TurnOn(50); _powertube.TurnOff(); Assert.That(_stringWriter.ToString().Contains("off")); }
public void TurnOff_WasOff_NoOutput() { _powerTube.TurnOff(); _output.DidNotReceive().OutputLine(Arg.Any <string>()); }
public void TurnOnThenTurnOff() { PT_.TurnOn(50); PT_.TurnOff(); StringAssert.Contains("PowerTube turned off", SW_.ToString()); }
public void TurnOff_OutputLine_displays_PowerTubeTurnedOff() { _powerTube.TurnOn(60); _powerTube.TurnOff(); Assert.That(!_stringWriter.ToString().Contains("off")); }
public void TurnOff_WasOn_CorrectOutput() { uut.TurnOn(50); uut.TurnOff(); }
public void TurnOff_WasOn_CorrectOutput() { uut.TurnOn(50); uut.TurnOff(); Assert.That(str.ToString().Contains($"PowerTube turned off")); }