-
Notifications
You must be signed in to change notification settings - Fork 50
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
return null if subject not implementing IWithId #2094
Conversation
There was a problem hiding this 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; |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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
There was a problem hiding this 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
Fixes #2050 (Saving project with parameter identification feedback does not crash)