-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #249 from DentallApp/patch-24
Add integration tests for CREATE operations
- Loading branch information
Showing
29 changed files
with
1,613 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
namespace IntegrationTests.Common.Seeds; | ||
|
||
public class EmployeeSeeds | ||
{ | ||
public static List<Employee> Get() | ||
=> | ||
[ | ||
new() | ||
{ | ||
Id = 1, | ||
UserId = 3, | ||
PersonId = 3, | ||
OfficeId = 1 | ||
}, | ||
new() | ||
{ | ||
Id = 2, | ||
UserId = 4, | ||
PersonId = 4, | ||
OfficeId = 1, | ||
PregradeUniversity = "UG", | ||
PostgradeUniversity = "UG" | ||
}, | ||
new() | ||
{ | ||
Id = 3, | ||
UserId = 5, | ||
PersonId = 5, | ||
OfficeId = 1, | ||
PregradeUniversity = "UG", | ||
PostgradeUniversity = "UG" | ||
}, | ||
new() | ||
{ | ||
Id = 4, | ||
UserId = 6, | ||
PersonId = 6, | ||
OfficeId = 1, | ||
PregradeUniversity = "UG", | ||
PostgradeUniversity = "UG" | ||
} | ||
]; | ||
} |
33 changes: 33 additions & 0 deletions
33
tests/IntegrationTests/Common/Seeds/GeneralTreatmentSeeds.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
namespace IntegrationTests.Common.Seeds; | ||
|
||
public class GeneralTreatmentSeeds | ||
{ | ||
public static List<GeneralTreatment> Get() | ||
=> | ||
[ | ||
new() | ||
{ | ||
Id = 1, | ||
Name = "Ortodoncia/brackets", | ||
Description = "Test", | ||
ImageUrl = "ortodoncia.png", | ||
Duration = 40 | ||
}, | ||
new() | ||
{ | ||
Id = 2, | ||
Name = "Calces/resinas", | ||
Description = "Test", | ||
ImageUrl = "calce.png", | ||
Duration = 40 | ||
}, | ||
new() | ||
{ | ||
Id = 3, | ||
Name = "Tratamiento de conductos/endodoncia", | ||
Description = "Test", | ||
ImageUrl = "endodoncia.png", | ||
Duration = 180 | ||
}, | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
namespace IntegrationTests.Common.Seeds; | ||
|
||
public class OfficeSeeds | ||
{ | ||
public static List<Office> Get() | ||
=> | ||
[ | ||
new() | ||
{ | ||
Id = 1, | ||
Name = "Mapasingue", | ||
Address = "None", | ||
ContactNumber = "0980852228" | ||
}, | ||
new() | ||
{ | ||
Id = 2, | ||
Name = "El Triunfo", | ||
Address = "None", | ||
ContactNumber = "0980852228" | ||
}, | ||
new() | ||
{ | ||
Id = 3, | ||
Name = "Naranjito", | ||
Address = "None", | ||
ContactNumber = "0980852228" | ||
} | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
namespace IntegrationTests.Common.Seeds; | ||
|
||
public class RoleSeeds | ||
{ | ||
public static List<Role> GetRoles() | ||
=> | ||
[ | ||
new() { Id = 1, Name = RoleName.Unverified }, | ||
new() { Id = 2, Name = RoleName.BasicUser }, | ||
new() { Id = 3, Name = RoleName.Secretary }, | ||
new() { Id = 4, Name = RoleName.Dentist }, | ||
new() { Id = 5, Name = RoleName.Admin }, | ||
new() { Id = 6, Name = RoleName.Superadmin } | ||
]; | ||
|
||
public static List<UserRole> GetUserRoles() | ||
=> | ||
[ | ||
new() | ||
{ | ||
Id = 1, | ||
UserId = 1, | ||
RoleId = (int)Role.Predefined.Unverified | ||
}, | ||
new() | ||
{ | ||
Id = 2, | ||
UserId = 2, | ||
RoleId = (int)Role.Predefined.BasicUser | ||
}, | ||
new() | ||
{ | ||
Id = 3, | ||
UserId = 3, | ||
RoleId = (int)Role.Predefined.Secretary | ||
}, | ||
new() | ||
{ | ||
Id = 4, | ||
UserId = 4, | ||
RoleId = (int)Role.Predefined.Dentist | ||
}, | ||
new() | ||
{ | ||
Id = 5, | ||
UserId = 5, | ||
RoleId = (int)Role.Predefined.Admin | ||
}, | ||
new() | ||
{ | ||
Id = 6, | ||
UserId = 6, | ||
RoleId = (int)Role.Predefined.Superadmin | ||
} | ||
]; | ||
} |
Oops, something went wrong.