Created
January 19, 2011 10:00
-
-
Save mgenov/785938 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Factories(value = PricingRequestFactory.class) | |
public class RequestFactorySampleTest extends RequestFactoryJreTest{ | |
@Inject | |
PricingService pricingService; | |
@Inject | |
PricingRequestFactory rf; | |
@Test | |
public void findPricingTemplate() { | |
final PricingTemplate existingPricingTemplate = new PricingTemplate(1l, "Test"); | |
expect(pricingService.findPricingTemplate(1l)).andReturn(existingPricingTemplate); | |
replay(pricingService); | |
rf.pricingRequest().findPricingTemplate(1l).fire(new Receiver<PricingTemplateProxy>() { | |
@Override | |
public void onSuccess(PricingTemplateProxy response) { | |
assertEquals("template name was different?",response.getName(), existingPricingTemplate.getName()); | |
} | |
}); | |
verify(pricingService); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment