diff --git a/NUnitTests/T_Serv_YearsAndPeriodsManagement.cs b/NUnitTests/T_Serv_YearsAndPeriodsManagement.cs index 00b8c90..d341d29 100644 --- a/NUnitTests/T_Serv_YearsAndPeriodsManagement.cs +++ b/NUnitTests/T_Serv_YearsAndPeriodsManagement.cs @@ -26,34 +26,38 @@ public void T_SchoolYears_Create() Assert.That(Test_Commons.dl.SchoolYearExists(sy.IdSchoolYear)); Test_Commons.dl.DeleteSchoolYear(sy.IdSchoolYear); } + [Test] public void T_SchoolYears_Read() { // test of DataLayer Methods that read data from table SchoolYears bool test = Test_Commons.dl.SchoolYearExists("17-18"); - Assert.That(test = true); //in teoria se � true significa che quell anno esiste + Assert.That(test = true); //in teoria se �è true significa che quell anno esiste } [Test] public void T_SchoolYears_Update(/*SchoolYear schoolYear*/) { SchoolYear schoolYear1 = new(); - schoolYear1.IdSchoolYear = "11-12"; + schoolYear1.IdSchoolYear = "27-28"; schoolYear1.ShortDescription = "2023-2024"; - schoolYear1.Notes = "Anno scolastico introdotto per sola prova"; - // test of DataLayer Methods that update data from table SchoolYears + schoolYear1.Notes = "Anno scolastico introdotto per sola prova"; // test of DataLayer Methods that update data from table SchoolYears + Assert.That(!Test_Commons.dl.SchoolYearExists(schoolYear1.IdSchoolYear)); Test_Commons.dl.AddSchoolYear(schoolYear1); Assert.That(Test_Commons.dl.SchoolYearExists(schoolYear1.IdSchoolYear)); + Test_Commons.dl.DeleteSchoolYear(schoolYear1.IdSchoolYear); + + } [Test] public void T_SchoolYears_Delete() { // test of DataLayer Methods that delete data from table SchoolYears SchoolYear schoolYear1 = new(); - schoolYear1.IdSchoolYear = "23-24"; + schoolYear1.IdSchoolYear = "27-28"; schoolYear1.ShortDescription = "2024-2025"; - schoolYear1.Notes = "Anno scolastico introdotto per sola prova"; - Test_Commons.dl.AddSchoolYear(schoolYear1); - Test_Commons.dl.DeleteTable("SchoolYears"); + schoolYear1.Notes = "Anno scolastico introdotto per sola prova"; + //Test_Commons.dl.AddSchoolYear(schoolYear1); + Test_Commons.dl.DeleteSchoolYear("SchoolYears"); Assert.That(!Test_Commons.dl.ExistsTable("SchoolYears")); } }