예제 #1
0
        public void ArgumentsInput_Argument_NumberOfGroups_IsNegative()
        {
            InputClass inputClass = new InputClass();

            string[] args = { "-5", "Students.txt", "Subjects.txt" };
            Assert.That(() => inputClass.ArgumentsInput(args), Throws.Exception);
        }
예제 #2
0
        public void ArgumentsInput_Argument_NumberOfGroups_IsZero()
        {
            InputClass inputClass = new InputClass();

            string[] args = { "0", "Students.txt", "Subjects.txt" };
            Assert.That(() => inputClass.ArgumentsInput(args), Throws.Exception.TypeOf <DivideByZeroException>().And.Message.EqualTo("No puede haber 0 grupos."));
        }
예제 #3
0
        public void ArgumentsInput_All_AreNull()
        {
            InputClass inputClass = new InputClass();

            string[] args = { null, null, null };
            Assert.That(() => inputClass.ArgumentsInput(args), Throws.ArgumentNullException);
        }
예제 #4
0
        public void ArgumentsInput_FileDirectionSubjects_IsNull()
        {
            InputClass inputClass = new InputClass();

            string[] args = { "5", "Students.txt", null };
            Assert.That(() => inputClass.ArgumentsInput(args), Throws.ArgumentNullException);
        }
예제 #5
0
        public void ArgumentsInput_numberOfGroups_IsNull()
        {
            InputClass inputClass = new InputClass();

            string[] args = { null, "Students.txt", "Subjects.txt" };
            Assert.That(() => inputClass.ArgumentsInput(args), Throws.ArgumentNullException);
        }
예제 #6
0
        public void ArgumentsInput_File_Not_Found()
        {
            InputClass inputClass = new InputClass();

            string[] args = { "5", "Students.txt", "Subjects.txt" };

            Assert.That(() => inputClass.ArgumentsInput(args), Throws.Exception.TypeOf <FileNotFoundException>());
        }