@Test public void testGetNativeSizeReturnsSameSizeAsAreaProvider() { NiftyImage image = createMock(NiftyImage.class); AreaProvider areaProvider = createMock(AreaProvider.class); expect(areaProvider.getNativeSize(image)).andReturn(new Size(1, 2)).anyTimes(); replay(areaProvider); RenderStrategy renderStrategy = createMock(RenderStrategy.class); CompoundImageMode imageMode = new CompoundImageMode(areaProvider, renderStrategy); assertEquals(imageMode.getImageNativeSize(image), areaProvider.getNativeSize(image)); verify(areaProvider); }
@Override public Size getImageNativeSize(NiftyImage image) { return m_areaProvider.getNativeSize(image); }
CompoundImageMode implements ImageMode { @Override public Size getImageNativeSize(NiftyImage image) { return m_areaProvider.getNativeSize(image); } }
CompoundImageMode implements ImageMode { @Override public Size getImageNativeSize(NiftyImage image) { return m_areaProvider.getNativeSize(image); } CompoundImageMode(AreaProvider areaProvider, RenderStrategy renderStrategy); }
CompoundImageMode implements ImageMode { @Override public Size getImageNativeSize(NiftyImage image) { return m_areaProvider.getNativeSize(image); } CompoundImageMode(AreaProvider areaProvider, RenderStrategy renderStrategy); @Override void setParameters(final String parameters); @Override void render(
      @Nonnull RenderDevice renderDevice,
      RenderImage renderImage,
      int x,
      int y,
      int width,
      int height,
      Color color,
      float scale); @Override Size getImageNativeSize(NiftyImage image); }
CompoundImageMode implements ImageMode { @Override public Size getImageNativeSize(NiftyImage image) { return m_areaProvider.getNativeSize(image); } CompoundImageMode(AreaProvider areaProvider, RenderStrategy renderStrategy); @Override void setParameters(final String parameters); @Override void render(
      @Nonnull RenderDevice renderDevice,
      RenderImage renderImage,
      int x,
      int y,
      int width,
      int height,
      Color color,
      float scale); @Override Size getImageNativeSize(NiftyImage image);  }