skmkqw
skmkqw
CC#
Created by skmkqw on 5/26/2024 in #help
Can't style NavLink in Blazor
I've been trying to create a frontend part of my application. My sidebar contained div's representing each page section. Recently i found out that using NavLinks is more correct in Blazor. Navigation itself works as expected, but no styles are applied to NavLinks. I've tried to style it in different ways, but none of them helped. adding styles to .element-style in chrome devtools works, so it looks like i'm referencing navlinks in a wrong way. See Layout branch -> ProjectPulse.Web->Components->Layout->Sidebar.razor https://github.com/skmkqw/ProjectPulseApp/tree/Layout
1 replies
CC#
Created by skmkqw on 5/14/2024 in #help
Cant create seed data for integrational tests
Hello evereybody. I've recently updated my projects with authentification. Before that, i managed users as simple database resource with simple CRUD operations. Now my AppUser inherits from IdentityUser. I also added a new endpoint for user registration. But now i need to update my integrational tests and im having problems with inserting seed data into test database. How to fix my WebApplicationFactory and Utilites classes to add/delete seede users to database?
12 replies
CC#
Created by skmkqw on 5/13/2024 in #help
Problem with seeding data
Hello evereybody. I've recently updated my projects with authentification. Before that, i managed users as simple database resource with simple CRUD operations. Now my AppUser inherits from IdentityUser. I also added a new endpoint for user registration. But now i need to update my integrational tests and im having problems with inserting seed data into test database. How to fix my WebApplicationFactory and Utilites classes to add/delete seede users to database?
1 replies
CC#
Created by skmkqw on 5/12/2024 in #help
Integrational testing and authentification
Hello evereybody. I've recently updated my projects with authentification. Before that, i managed users as simple database resource with simple CRUD operations. Now my AppUser inherits from IdentityUser. I also added a new endpoint for user registration. But now i need to update my integrational tests and im having problems with inserting seed data into test database. How to fix my WebApplicationFactory and Utilites classes to add/delete seede users to database?
1 replies
CC#
Created by skmkqw on 5/2/2024 in #help
Is my unit testing approach correct?
Hello everybody, i'm getting into backend development in asp.net core and ef. i've already built a simple API, but it has an overkill architecure (made this in educational purposes). Now I'm trying to cover the whole project in unit tests. Since I use dbContext -> repository -> service -> controller pattern, i came up with an idea on how to test it: while testing the controller, i will create a mock service, while testing the service, i will create a mock repository, while testing the repository, I will create a fixture database with an example dataset. Does this make sense? You can see my latest code here https://github.com/skmkqw/ProjectManagementAPI at "unitTests" branch. I also hear of something called FluentAssertions. Should i user it from the beggining or should i introduce it later when I will get used to writing tests in regular xUnit?
13 replies