public void GivenStarted_WhenStop_NothingHappens() { var testee = new PollingDatabaseListener(new Mock <ILogger>().Object, new Mock <IConnectionStringProvider>().Object); var action = new Action(() => testee.StopListening()); action.ShouldNotThrow(); }
public void GivenNotInitialized_WhenStart_ShouldThrowException() { var testee = new PollingDatabaseListener(new Mock <ILogger>().Object, new Mock <IConnectionStringProvider>().Object); var action = new Action(() => testee.StartListening()); action.ShouldThrow <ApplicationException>(); }