@Override
public String getViewPartId() {
return IssueConstants.VIEW_ID;
}
};
IssueHandler handler = IssueHandler.createHandler(issue);
handler.restoreViewPart();
assertTrue( getActivePart() instanceof IssuesView );
issue = new TestIssue(){
@Override
public String getViewPartId() {
return ViewPart1.ID;
}
};
handler = IssueHandler.createHandler(issue);
handler.restoreViewPart();
assertTrue( getActivePart() instanceof ViewPart1 );
issue = new TestIssue(){
@Override
public String getViewPartId() {
return ViewPart1.ID;
}
@Override
public void getViewMemento(IMemento memento) {
memento.putString("testKey", "value"); //$NON-NLS-1$//$NON-NLS-2$
}
};
handler = IssueHandler.createHandler(issue);
handler.restoreViewPart();
assertTrue( getActivePart() instanceof ViewPart1 );
assertEquals("value", ((ViewPart1)getActivePart()).memento.getString("testKey")); //$NON-NLS-1$ //$NON-NLS-2$
}