コード例 #1
0
        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();
        }
コード例 #2
0
        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>();
        }