friedice
❔ Question about storing large amt of data for Unit Testing
This is my first time creating a unit test environment so I'm not sure about best practices.
I created unit test project for my DAL. I want to mock the data from the repo call, so I store the raw data as a json format inside txt. It's not too big, but I don't want to clunk up the solution because am going to do the same for every repo call, which could be about ~100MB - 500MB of just raw txt data if I do 100% code coverage for all the services.
Should I create a ZIP and compress all the files in there? Is there a better solution? Am I doing this all wrong?
10 replies
❔ Issue with unit testing and projects not starting
I'm writing up tests for my controller, but I need to grab an access token for authorization to do anything. We're using OIDC and it's endpoint is
https://localhost:5001
When I run this function in test explorer, I get a System.Net.Http.HttpRequestException : No connection could be made because the target machine actively refused it. (localhost:5001)
However, when I open a separate instance of VS and run the application, then run test on the 1st VS, everything works fine. How do I make it so that I don't need to do all the shenanigans and just run the test from the test explorer?6 replies
❔ Data-binding multiple components Blazor
So let's say I have 3 components. Component C is a child of component B, and component B is a child of component A. Is it possible 2-way bind Component C and component A so that when a parameter value of Component C is updated, Component A's value will also get updated?
6 replies