Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tutti e 4 i test funzionanti #159

Open
wants to merge 2 commits into
base: SQLserverLayer
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions NUnitTests/T_Serv_YearsAndPeriodsManagement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}
}
Expand Down