@Test public void testIsSameClass() { BindableShapeSetThumbProvider provider = new StubProvider(definitionManager); BindableShapeSetThumbProvider sameProvider = new StubProvider(definitionManager2); assertTrue(provider.isSameClass(provider.getClass(), provider.getClass())); assertTrue(provider.isSameClass(provider.getClass(), sameProvider.getClass())); assertTrue(provider.isSameClass(sameProvider.getClass(), provider.getClass())); assertFalse(provider.isSameClass(null, provider.getClass())); assertFalse(provider.isSameClass(provider.getClass(), null)); assertFalse(provider.isSameClass(provider.getClass(), Object.class)); assertFalse(provider.isSameClass(Object.class, provider.getClass())); }
protected boolean isSameClass(final Class<?> c1, final Class<?> c2) { return Objects.equals(c1, c2); }
BindableShapeSetThumbProvider implements ShapeSetThumbProvider { protected boolean isSameClass(final Class<?> c1, final Class<?> c2) { return Objects.equals(c1, c2); } }
BindableShapeSetThumbProvider implements ShapeSetThumbProvider { protected boolean isSameClass(final Class<?> c1, final Class<?> c2) { return Objects.equals(c1, c2); } BindableShapeSetThumbProvider(final DefinitionManager definitionManager); }
BindableShapeSetThumbProvider implements ShapeSetThumbProvider { protected boolean isSameClass(final Class<?> c1, final Class<?> c2) { return Objects.equals(c1, c2); } BindableShapeSetThumbProvider(final DefinitionManager definitionManager); @Override Class<String> getSourceType(); @Override boolean thumbFor(final String definitionSetId); }
BindableShapeSetThumbProvider implements ShapeSetThumbProvider { protected boolean isSameClass(final Class<?> c1, final Class<?> c2) { return Objects.equals(c1, c2); } BindableShapeSetThumbProvider(final DefinitionManager definitionManager); @Override Class<String> getSourceType(); @Override boolean thumbFor(final String definitionSetId);  }