public void GivenFixtureStateNullShouldSuspendOnDisconnectionReturnsTrue()
        {
            //
            //Arrange
            //
            var streamHealthCheckValidation = new StreamHealthCheckValidation(_settings.Object);

            //
            //Act
            //
            bool shouldSuspendOnDisconnection = streamHealthCheckValidation.ShouldSuspendOnDisconnection(
                null,
                It.IsAny <DateTime?>());

            //
            //Assert
            //
            Assert.IsTrue(shouldSuspendOnDisconnection);
        }
        public void GivenFixtureStartTimeNullShouldSuspendOnDisconnectionReturnsTrue()
        {
            //
            //Arrange
            //
            var fixtureState = new FixtureState();
            var streamHealthCheckValidation = new StreamHealthCheckValidation(_settings.Object);

            //
            //Act
            //
            bool shouldSuspendOnDisconnection = streamHealthCheckValidation.ShouldSuspendOnDisconnection(
                fixtureState,
                null);

            //
            //Assert
            //
            Assert.IsTrue(shouldSuspendOnDisconnection);
        }
        public void GivenFixtureStateNotNullAndStartTimeNotNullShouldSuspendOnDisconnectionReturnsTrue()
        {
            //
            //Arrange
            //
            var fixtureState = new FixtureState();

            _settings.SetupGet(o => o.DisablePrematchSuspensionOnDisconnection).Returns(false);
            var streamHealthCheckValidation = new StreamHealthCheckValidation(_settings.Object);

            //
            //Act
            //
            bool shouldSuspendOnDisconnection = streamHealthCheckValidation.ShouldSuspendOnDisconnection(
                fixtureState,
                It.IsAny <DateTime>());

            //
            //Assert
            //
            Assert.IsTrue(shouldSuspendOnDisconnection);
        }
        public void GivenFixtureStateAndStartTimeAreInvalidThenShouldSuspendOnDisconnectionReturnsFalse()
        {
            //
            //Arrange
            //
            var fixtureState = new FixtureState();

            _settings.SetupGet(o => o.DisablePrematchSuspensionOnDisconnection).Returns(true);
            _settings.SetupGet(o => o.PreMatchSuspensionBeforeStartTimeInMins).Returns(5);
            var streamHealthCheckValidation = new StreamHealthCheckValidation(_settings.Object);

            //
            //Act
            //
            bool shouldSuspendOnDisconnection = streamHealthCheckValidation.ShouldSuspendOnDisconnection(
                fixtureState,
                DateTime.UtcNow.AddMinutes(10));

            //
            //Assert
            //
            Assert.IsFalse(shouldSuspendOnDisconnection);
        }