Open pjduri opened 6 months ago
For at least some of the tests, one solution would be to have a getter for nextId
so that you can look it up before more objects are created and generate the expected ids from there. I got different actual ids depending on whether I ran one test, some of the tests, or all of the tests (and also depending on how many tests existed at that point, as Patrick noted for Task 2 location test).
I realize this would not work as long as some of tests use the .txt
files for expected values, so a different approach altogether might be needed there to make them deterministic and stable.
Instructions link: https://education.launchcode.org/csharp-web-dev-curriculum/assignments/tech-jobs-oo/index.html
Starter code repo link: https://github.com/LaunchCodeEducation/CSharp6-TechJobs-OO
Task 2 - Location test expecting wrong id - before Task 6 is complete it is expecting an Id of 2 but will always get 1, and afterwards it will always get 8. Tasks 4 and 5 - missing using statement causes build errors when running tests. Suggest adding global using statement to Usings.cs in TechJobsOO.Tests project. Task 5 - second and sixth tests failing due to missing file references, Ids in .txt files do not line up - Ids are different from machine to machine.
Link to doc created for March2024FTWD cohort with full explanation and fixes: https://docs.google.com/document/d/1c_AjCYMi7cnmE0Ys74dLmadxe0DoayR9EZ08sdCbQ7w/edit?usp=sharing