示例#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>());
        }