18.3.2024 – Last week, I focused on refining the progress of the previous week’s report. Ensuring code cleanliness and passing all tests became the priority. To start, I addressed the omission of temporary data that should have been included as input for the new report’s table. This was achieved by creating the required services. Subsequently, I proceeded to conduct tests for this implementation. However, a challenge arose when these tests only passed when executed separately. They failed when run collectively. Seeking guidance, I consulted Mr. Peter, who suggested two approaches: testing the services separately or using IFixture to run all tests together. Initially opting for the latter for test consolidation, I encountered an error when attempting to implement a file from the context API due to circular dependencies. Consequently, Mr. Peter recommended creating separate tests for each scenario to facilitate future debugging.
Additionally, there was a service test that persistently failed despite successful data validation, specifically in failing to change one particular boolean property to true. Upon investigation, I realized this was due to an oversight I made when using the AsNoTracking() function within the Get() function, which prevented any changes from being applied. As a result, the boolean property failed to reflect the intended modifications. At the week’s end, I completed a new migration for the latest updates across several databases and generated the migration SQL script.
