private bool IsValid(string[] args)
 {
     return(BaseValidator.IsEmptyArr(args) &&
            BaseValidator.IsCorrectLength(args
                                          , InputDTO.CountParams) &&
            BaseValidator.DoesNotContainNull(args) &&
            BaseValidator.CanParseToInt64(args[0], false) &&
            BaseValidator.DoesContainEnum(args[1]
                                          , typeof(InputDTO.Algorithms)));
 }
Exemplo n.º 2
0
        public void DoesNotContainNull_SecondItemIsNull_False()
        {
            //arrange
            string[] arr = { "Test", null, "Test2" };

            //act
            bool result = BaseValidator.DoesNotContainNull(arr);

            //assert
            Assert.False(result);
        }
Exemplo n.º 3
0
        public void DoesNotContainNull_NotNullItems_True()
        {
            //arrange
            string[] arr = { "Test", "Test1", "Test2" };

            //act
            bool result = BaseValidator.DoesNotContainNull(arr);

            //assert
            Assert.True(result);
        }
Exemplo n.º 4
0
        public void DoesNotContainNull_Null_False()
        {
            //arrange
            string[] arr = null;

            //act
            bool result = BaseValidator.DoesNotContainNull(arr);

            //assert
            Assert.False(result);
        }