public void GetSchoolsForDeclaration_NotExist() { var repo = new StudentDeclarationRepository(_context); var id = Guid.NewGuid(); var result = repo.GetSchools(id).ToList(); Assert.IsTrue(result.Count() == 0); }
public void GetSchoolsForDeclaration_IsExist() { var repo = new StudentDeclarationRepository(_context); var id = "63BBECCB-E8B2-4EF6-BF36-0F16387F2611".ConvertToGuid(); var result = repo.GetSchools(id).ToList(); Assert.IsTrue(result.Count() > 0); }
public void GetProfessionalClassesForDeclaration_NotExist() { var repo = new StudentDeclarationRepository(_context); var id = Guid.NewGuid(); var result = repo.GetProfessionalClasses(id); Assert.IsTrue(result.Count() == 0); }
public void GetSchoolsForDeclaration_NotExist() { var repo = new StudentDeclarationRepository(_context); var id = Guid.NewGuid(); var result = repo.GetSchools(id).ToList(); Assert.IsTrue(result.Count() == 0); }
public void GetSchoolsForDeclaration_IsExist() { var repo = new StudentDeclarationRepository(_context); var id = "63BBECCB-E8B2-4EF6-BF36-0F16387F2611".ConvertToGuid(); var result = repo.GetSchools(id).ToList(); Assert.IsTrue(result.Count() > 0); }
public void GetProfessionalClassesForDeclaration_NotExist() { var repo = new StudentDeclarationRepository(_context); var id = Guid.NewGuid(); var result = repo.GetProfessionalClasses(id); Assert.IsTrue(result.Count() == 0); }
public void GetStudentDeclaration() { var repo = new StudentDeclarationRepository(_context); var results = repo.Find(t => t.DeclarationJiaoWu.SchoolYearTerm.Year == "2013-2014" && t.DeclarationJiaoWu.SchoolYearTerm.Term == "2"); Assert.IsTrue(results.Count() > 0); }
public void GetDeclarationCount() { var repo = new StudentDeclarationRepository(_context); var id = "63BBECCB-E8B2-4EF6-BF36-0F16387F2611".ConvertToGuid(); var result = repo.GetProfessionalClasses(id).ToList(); var declarationCount = repo.Single(t => t.ID == id).DeclarationJiaoWu.DeclarationCount; var sum = result.Sum(t => t.StudentCount); Assert.IsTrue(sum <= declarationCount); }
public void DeclarationCountOfStudentDeclaration() { var repo = new StudentDeclarationRepository(_context); var decls = repo.Find(t => t.DeclarationJiaoWu.SchoolYearTerm.Year == "2013-2014" && t.DeclarationJiaoWu.SchoolYearTerm.Term == "2" ); var result = decls.Sum(t => t.DeclarationJiaoWu.DeclarationCount); Assert.IsTrue(result > 0); }
public void GetDeclarationCount() { var repo = new StudentDeclarationRepository(_context); var id = "63BBECCB-E8B2-4EF6-BF36-0F16387F2611".ConvertToGuid(); var result = repo.GetProfessionalClasses(id).ToList(); var declarationCount = repo.Single(t => t.ID == id).DeclarationJiaoWu.DeclarationCount; var sum = result.Sum(t => t.StudentCount); Assert.IsTrue(sum <= declarationCount); }
public void GetStudentDeclaration_FromStudentDeclarationJiaoWu() { var repo = new StudentDeclarationRepository(_context); var decls = repo.Find(t => t.DeclarationJiaoWu.SchoolYearTerm.Year == "2013-2014" && t.DeclarationJiaoWu.SchoolYearTerm.Term == "2" ).Select(d => d.DeclarationJiaoWu); var result = decls.Sum(t => t.DeclarationCount); Assert.IsTrue(result > 0); }
public void GetStudentDeclaration() { var repo = new StudentDeclarationRepository(_context); var results = repo.Find(t => t.DeclarationJiaoWu.SchoolYearTerm.Year == "2013-2014" && t.DeclarationJiaoWu.SchoolYearTerm.Term == "2"); Assert.IsTrue(results.Count() > 0); }