Example #1
0
        public void GetExecutableInfo_WhenValueIsNegative_ThenCannotExecuteAndReturnErrorMessage()
        {
            //Arrange
            var squareRoot = new SquareRoot();

            //Act
            var executableInfo = squareRoot.GetExecutableInfo(-1);

            //Assert
            Assert.That(executableInfo.Message, Is.EqualTo(ErrorMessages.InvalidInput));
        }
Example #2
0
        public void GetExecutableInfo_WhenValueIsNotNegative_ThenCanExecute(double value)
        {
            //Arrange
            var squareRoot = new SquareRoot();

            //Act
            var executableInfo = squareRoot.GetExecutableInfo(value);

            //Assert
            Assert.That(executableInfo.CanBeExecuted, Is.True);
        }