@Test public void name() throws Exception { Bundle bundle = mock(Bundle.class); BundleModel model = new BundleModel(bundle); when(bundle.getBundleId()).thenReturn(1l); when(bundle.getSymbolicName()).thenReturn("acme"); when(bundle.getVersion()).thenReturn(new Version(1, 0, 0)); assertThat(model.getName()).contains("acme").contains("1.0.0"); when(bundle.getVersion()).thenReturn(new Version(1, 0, 0, "snapshot")); assertThat(model.getName()).contains("acme").contains("1.0.0.snapshot"); }
public String getName() { return bundle.getSymbolicName() + " - " + bundle.getVersion(); }
BundleModel { public String getName() { return bundle.getSymbolicName() + " - " + bundle.getVersion(); } }
BundleModel { public String getName() { return bundle.getSymbolicName() + " - " + bundle.getVersion(); } BundleModel(Bundle bundle); }
BundleModel { public String getName() { return bundle.getSymbolicName() + " - " + bundle.getVersion(); } BundleModel(Bundle bundle); static List<BundleModel> bundles(BundleContext context); String getState(); long getId(); String getName(); Map<String, String> getHeaders(); }
BundleModel { public String getName() { return bundle.getSymbolicName() + " - " + bundle.getVersion(); } BundleModel(Bundle bundle); static List<BundleModel> bundles(BundleContext context); String getState(); long getId(); String getName(); Map<String, String> getHeaders();  }