public void StartAsync_ConditionalIsFalse_ShouldNotCallStarterStart() { // Act var sut = new ThermometerConditionalStarter(false, _concreteStarter); var task = sut.StartAsync(); task.Wait(); // Assert _concreteStarter.AssertWasNotCalled(x => x.StartAsync()); Assert.AreEqual(sut, task.Result); }
public void StartAsync_ConditionalIsTrue_ShouldCallStarterStart() { // Act var sut = new ThermometerConditionalStarter(true, _concreteStarter); var task = sut.StartAsync(); task.Wait(); // Assert _concreteStarter.AssertWasCalled(x => x.StartAsync()); Assert.AreEqual(_disposible, task.Result); }