@Test(dependsOnMethods = {"testAttachView", "testInstantiate"}) public void testClearViews() { Model i = new DefaultModel(); ModelView v1 = mock(ModelView.class); when(v1.getIdentifier()).thenReturn("cpu"); ModelView v2 = mock(ModelView.class); when(v2.getIdentifier()).thenReturn("mem"); i.attach(v1); i.attach(v2); i.clearViews(); Assert.assertTrue(i.getViews().isEmpty()); }
@Override public void clearViews() { this.resources.clear(); }
DefaultModel implements Model { @Override public void clearViews() { this.resources.clear(); } }
DefaultModel implements Model { @Override public void clearViews() { this.resources.clear(); } DefaultModel();  DefaultModel(ElementBuilder eb); }
DefaultModel implements Model { @Override public void clearViews() { this.resources.clear(); } DefaultModel();  DefaultModel(ElementBuilder eb); @Override ModelView getView(String id); @Override boolean attach(ModelView v); @Override Collection<ModelView> getViews(); @Override Mapping getMapping(); @Override boolean equals(Object o); @Override int hashCode(); @Override boolean detach(ModelView v); @Override void clearViews(); @Override Attributes getAttributes(); @Override void setAttributes(Attributes a); @Override Model copy(); @Override String toString(); @Override VM newVM(); @Override VM newVM(int id); @Override Node newNode(); @Override Node newNode(int id); @Override boolean contains(VM v); @Override boolean contains(Node n); }
DefaultModel implements Model { @Override public void clearViews() { this.resources.clear(); } DefaultModel();  DefaultModel(ElementBuilder eb); @Override ModelView getView(String id); @Override boolean attach(ModelView v); @Override Collection<ModelView> getViews(); @Override Mapping getMapping(); @Override boolean equals(Object o); @Override int hashCode(); @Override boolean detach(ModelView v); @Override void clearViews(); @Override Attributes getAttributes(); @Override void setAttributes(Attributes a); @Override Model copy(); @Override String toString(); @Override VM newVM(); @Override VM newVM(int id); @Override Node newNode(); @Override Node newNode(int id); @Override boolean contains(VM v); @Override boolean contains(Node n);  }