@Test public void testIsDirtyEdited() { List<Avu> userMetadata = new ArrayList<>(); Avu md1 = mock(Avu.class); Avu md2 = mock(Avu.class); userMetadata.add(md1); userMetadata.add(md2); when(view.getUserMetadata()).thenReturn(userMetadata); when(userMdList.size()).thenReturn(1); when(view.isDirty()).thenReturn(true); Assert.assertEquals(true,presenter.isDirty()); }
@Override public boolean isDirty() { List<Avu> userMetadata = view.getUserMetadata(); if(userMdList != null && userMetadata != null && userMdList.size() != userMetadata.size()) { return true; } else { return view.isDirty(); } }
MetadataPresenterImpl implements MetadataView.Presenter { @Override public boolean isDirty() { List<Avu> userMetadata = view.getUserMetadata(); if(userMdList != null && userMetadata != null && userMdList.size() != userMetadata.size()) { return true; } else { return view.isDirty(); } } }
MetadataPresenterImpl implements MetadataView.Presenter { @Override public boolean isDirty() { List<Avu> userMetadata = view.getUserMetadata(); if(userMdList != null && userMetadata != null && userMdList.size() != userMetadata.size()) { return true; } else { return view.isDirty(); } } MetadataPresenterImpl(final DiskResource selected,
                                 final MetadataView view,
                                 final DiskResourceServiceFacade drService); }
MetadataPresenterImpl implements MetadataView.Presenter { @Override public boolean isDirty() { List<Avu> userMetadata = view.getUserMetadata(); if(userMdList != null && userMetadata != null && userMdList.size() != userMetadata.size()) { return true; } else { return view.isDirty(); } } MetadataPresenterImpl(final DiskResource selected,
                                 final MetadataView view,
                                 final DiskResourceServiceFacade drService); @Override void go(HasOneWidget container); @Override void setDiskResourceMetadata(final DiskResourceMetadataUpdateCallback callback); @Override void onSelectTemplate(); @Override void onTemplateSelected(String templateId); @Override DiskResource getSelectedResource(); @Override void onImport(final List<Avu> selectedItems); @Override boolean isDirty(); @Override void downloadTemplate(String templateid); static Avu newMetadata(String attr, String value, String unit); @Override Avu setAvuModelKey(Avu avu); }
MetadataPresenterImpl implements MetadataView.Presenter { @Override public boolean isDirty() { List<Avu> userMetadata = view.getUserMetadata(); if(userMdList != null && userMetadata != null && userMdList.size() != userMetadata.size()) { return true; } else { return view.isDirty(); } } MetadataPresenterImpl(final DiskResource selected,
                                 final MetadataView view,
                                 final DiskResourceServiceFacade drService); @Override void go(HasOneWidget container); @Override void setDiskResourceMetadata(final DiskResourceMetadataUpdateCallback callback); @Override void onSelectTemplate(); @Override void onTemplateSelected(String templateId); @Override DiskResource getSelectedResource(); @Override void onImport(final List<Avu> selectedItems); @Override boolean isDirty(); @Override void downloadTemplate(String templateid); static Avu newMetadata(String attr, String value, String unit); @Override Avu setAvuModelKey(Avu avu);  }