コード例 #1
0
ファイル: StudentDAOTests.cs プロジェクト: EnPeRe/Vueling
        public void TxtAddTest(int id, string name, string surname, int edad, string dni, string datebirth)
        {
            log.Info(System.Reflection.MethodBase.GetCurrentMethod().Name + " iniciado");

            Student student = new Student(id, name, surname, edad, dni, datebirth);

            AbstarctFactory formatfactory = new FormatFactory();
            IStudentDao     stddao        = formatfactory.CreateStudentFormat("txt");

            Student studenttest = stddao.Add(student);

            studenttest.FechaNacimiento = student.FechaNacimiento;

            log.Info("studenttest G: " + studenttest.Student_Guid + ", stuednt G:" + student.Student_Guid);

            log.Info("studenttest: " + studenttest.FechaNacimiento + ", stuednt:" + student.FechaNacimiento);
            log.Info("studenttest: " + studenttest.Nombre + ", stuednt:" + student.Nombre);
            log.Info("studenttest: " + studenttest.Edad + ", stuednt:" + student.Edad);
            log.Info("studenttest: " + studenttest.HoraRegistro + ", stuednt:" + student.HoraRegistro);
            log.Info("studenttest: " + studenttest.IdAlumno + ", stuednt:" + student.IdAlumno);
            log.Info("studenttest: " + studenttest.Apellido + ", stuednt:" + student.Apellido);
            log.Info("studenttest: " + studenttest.SavedFormat + ", stuednt:" + student.SavedFormat);
            log.Info("studenttest: " + studenttest.Dni + ", stuednt:" + student.Dni);

            Assert.IsTrue(student.Equals(studenttest));

            log.Info(System.Reflection.MethodBase.GetCurrentMethod().Name + " terminado");
        }