Package com.eclipsesource.jaxrs.provider.gson.internal

Examples of com.eclipsesource.jaxrs.provider.gson.internal.Activator


public class ActivatorTest {
 
  @Test
  public void testStartRegistersProvider() throws Exception {
    Activator activator = new Activator();
    BundleContext context = mock( BundleContext.class );
   
    activator.start( context );
   
    verify( context ).registerService( eq( GsonProvider.class.getName() ), any( GsonProvider.class ), any( Dictionary.class ) );
  }
View Full Code Here


    verify( context ).registerService( eq( GsonProvider.class.getName() ), any( GsonProvider.class ), any( Dictionary.class ) );
  }
 
  @Test
  public void testStopUnregistersProvider() throws Exception {
    Activator activator = new Activator();
    BundleContext context = mock( BundleContext.class );
    ServiceRegistration registration = mock( ServiceRegistration.class );
    when( context.registerService( any( String.class ), anyObject(), any( Dictionary.class ) ) )
      .thenReturn( registration );
   
    activator.start( context );
    activator.stop( context );
   
    verify( registration ).unregister();
  }
View Full Code Here

TOP

Related Classes of com.eclipsesource.jaxrs.provider.gson.internal.Activator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.