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 DoesContainEnum_NullStrNotEnumType_False()
        {
            //arrange
            string line = null;

            //act
            bool result = BaseValidator.DoesContainEnum(line, typeof(string));

            //assert
            Assert.False(result);
        }
Exemplo n.º 3
0
        public void DoesContainEnum_AllCorrect_True()
        {
            //arrange
            string line = "firstItem";

            //act
            bool result = BaseValidator.DoesContainEnum(line, typeof(TestEnum));

            //assert
            Assert.True(result);
        }
Exemplo n.º 4
0
        public void DoesContainEnum_NullStrNullEnum_False()
        {
            //arrange
            string line = null;

            //act
            bool result = BaseValidator.DoesContainEnum(line, null);

            //assert
            Assert.False(result);
        }