Exemplo n.º 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);
        }
Exemplo n.º 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."));
        }
Exemplo n.º 3
0
        public void ArgumentsInput_All_AreNull()
        {
            InputClass inputClass = new InputClass();

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

            string[] args = { "5", "Students.txt", null };
            Assert.That(() => inputClass.ArgumentsInput(args), Throws.ArgumentNullException);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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>());
        }