public void TestOperationInputsWhenNullInput()
        {
            var exceptionThrown = false;

            try
            {
                OperationInputs operationInput = new OperationInputs();
                operationInput.Validate();
            }
            catch (Exception ex)
            {
                exceptionThrown = true;
                Assert.Equal(typeof(ValidationException), ex.GetType());
            }
            Assert.True(exceptionThrown);
        }
Exemplo n.º 2
0
        public void TestOperationInputsWhenInvalidInput()
        {
            var exceptionThrown = false;

            try
            {
                var             nameInput      = "SOMEINVALIDINPUT";
                OperationInputs operationInput = new OperationInputs(nameInput);
                operationInput.Validate();
            }
            catch (Exception ex)
            {
                exceptionThrown = true;
                Assert.Equal(typeof(ValidationException), ex.GetType());
            }
            Assert.True(exceptionThrown);
        }