Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return null if subject not implementing IWithId #2094

Conversation

abdelr
Copy link
Member

@abdelr abdelr commented Feb 10, 2022

Fixes #2050 (Saving project with parameter identification feedback does not crash)

Copy link
Member

@msevestre msevestre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test missing. Required for bug fix. If not possible, please explain why

@@ -67,7 +67,7 @@ private WorkspaceLayout createNewWorkspaceLayoutWithOpenPresenters()
var workspaceLayout = new WorkspaceLayout();
foreach (var presenter in _applicationController.OpenedPresenters())
{
var withId = presenter.Subject.DowncastTo<IWithId>();
var withId = presenter.Subject as IWithId;
if (withId == null) continue;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test for this

}

[Observation]
public void should_return_an_object_containing_one_layout_item_for_each_opened_presenter_and_one_for_the_existing_layout_item()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test is ok but this caption is misleading. It does not create a layout item for each opened presenter! You are testing the opposite

Copy link
Member

@msevestre msevestre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please adjust title of test so that it reflect the expecations

@msevestre msevestre merged commit 9d7fd6c into develop Feb 10, 2022
@msevestre msevestre deleted the 2050_Saving_project_with_parameter_identification_feedback_does_not_crash branch February 10, 2022 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Saving a project in PKSim with Parameter Identification => Crash
2 participants