Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 340510
Collapse All | Expand All

(-)RAP UI Tests/org/eclipse/rap/ui/tests/ServiceHandlerExtensionTest.java (-3 / +19 lines)
Lines 15-32 Link Here
15
15
16
import org.eclipse.rap.ui.tests.impl.ServiceHandler1;
16
import org.eclipse.rap.ui.tests.impl.ServiceHandler1;
17
import org.eclipse.rap.ui.tests.impl.ServiceHandler2;
17
import org.eclipse.rap.ui.tests.impl.ServiceHandler2;
18
import org.eclipse.rwt.Fixture;
18
import org.eclipse.rwt.internal.service.ServiceManager;
19
import org.eclipse.rwt.internal.service.ServiceManager;
19
import org.eclipse.rwt.service.IServiceHandler;
20
import org.eclipse.rwt.service.IServiceHandler;
20
21
21
public class ServiceHandlerExtensionTest extends TestCase {
22
public class ServiceHandlerExtensionTest extends TestCase {
22
  
23
  
23
  public void testServieHandlerRegistration() {
24
  public void testServiceHandler1Registration() {
24
    IServiceHandler handler = ServiceManager.getCustomHandler( "myHandler1" );
25
    Fixture.fakeRequestParam( IServiceHandler.REQUEST_PARAM, "myHandler1" );
26
    
27
    IServiceHandler handler = ServiceManager.getHandler();
25
    assertNotNull( handler );
28
    assertNotNull( handler );
26
    assertTrue( handler instanceof ServiceHandler1 );
29
    assertTrue( handler instanceof ServiceHandler1 );
27
    handler = ServiceManager.getCustomHandler( "myHandler2" );
30
  }
31
32
  public void testServiceHandler2Registration() {
33
    Fixture.fakeRequestParam( IServiceHandler.REQUEST_PARAM, "myHandler2" );
34
    
35
    IServiceHandler handler = ServiceManager.getHandler();
28
    assertNotNull( handler );
36
    assertNotNull( handler );
29
    assertTrue( handler instanceof ServiceHandler2 );
37
    assertTrue( handler instanceof ServiceHandler2 );
30
  }
38
  }
39
40
  protected void setUp() {
41
    Fixture.fakeNewRequest();
42
  }
43
  
44
  protected void tearDown() {
45
    Fixture.tearDown();
46
  }
31
  
47
  
32
}
48
}

Return to bug 340510