Fixes #3394 Add registration for OSPSuite.Core.ICoreUserSettings in P…#3395
Conversation
📝 WalkthroughWalkthroughReplaces a DI registration to expose Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@tests/PKSim.R.Tests/RunSnapshotSpecs.cs`:
- Line 36: The test currently calls File.Exists(Path.Join(_outputFolder,
"Atazanavir-Model_1Sim.pksim5")) but discards the bool result so the assertion
never runs; change this to assert the existence using OSPSuite.BDDHelper (e.g.
call ShouldBeTrue() on the File.Exists(...) result or compare it with true using
ShouldBeEqualTo()), referencing File.Exists, Path.Join, _outputFolder and the
file name "Atazanavir-Model_1Sim.pksim5" so the test fails when the file is not
created.
🧹 Nitpick comments (2)
tests/PKSim.R.Tests/DomainHelperForSpecs.cs (1)
8-9: Misleading comment: theDatafolder belongs to PKSim.R.Tests, not PKSim.Tests.The comment says "Borrowing test data from PKSim.Tests" but the
Data\directory was added to this project (PKSim.R.Tests). Consider updating the comment to avoid confusion.tests/PKSim.R.Tests/RunSnapshotSpecs.cs (1)
13-14: HardcodedC:\root paths are fragile and may require elevated permissions.Writing directly to
C:\Input\andC:\Output\can fail on locked-down CI agents or developer machines without admin rights, and risks collisions with other processes. Consider usingPath.GetTempPath()or a similar per-run temporary directory.♻️ Suggested approach
- private readonly string _inputFolder = @"C:\Input\"; - private readonly string _outputFolder = @"C:\Output\"; + private readonly string _inputFolder = Path.Combine(Path.GetTempPath(), "PKSimRTests", "Input"); + private readonly string _outputFolder = Path.Combine(Path.GetTempPath(), "PKSimRTests", "Output");
Fixes #3394
Description
Adding registration for
OSPSuite.Core.ICoreUserSettingsas requiredType of change
Please mark relevant options with an
xin the brackets.How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Reviewer checklist
Mark everything that needs to be checked before merging the PR.
This change requires a documentation updateabove is selectedScreenshots (if appropriate):
Questions (if appropriate):
Summary by CodeRabbit
Tests
Chores
Refactor