assertReflectionEquals(View.createView("Tous", "http://myjenkins"), jenkins.getPrimaryView());
}
@Test
public void loadJenkinsWorkSpaceWithNestedViews() throws Exception {
Jenkins jenkins = jsonParser.createWorkspace(IOUtils.toString(getClass().getResourceAsStream("JsonRequestManager_loadWorkspaceWithNestedView.json")), "http://myjenkins");
List<View> actualViews = jenkins.getViews();
List<View> expectedViews = new LinkedList<View>();
expectedViews.add(View.createView("Framework", "http://myjenkins/view/Framework/"));
View nestedView = View.createView("NestedView", "http://myjenkins/view/NestedView/");
nestedView.addSubView(View.createNestedView("FirstSubView", "http://myjenkins/view/NestedView/view/FirstSubView/"));
nestedView.addSubView(View.createNestedView("SecondSubView", "http://myjenkins/view/NestedView/view/SecondSubView/"));
expectedViews.add(nestedView);
expectedViews.add(View.createView("Tous", "http://myjenkins/"));
assertReflectionEquals(expectedViews, actualViews);
assertReflectionEquals(View.createView("Tous", "http://myjenkins"), jenkins.getPrimaryView());
}