Examples of TdrGenerationRule


Examples of com.alu.e3.data.model.sub.TdrGenerationRule



  private static final TdrGenerationRule toDataModel(TdrData tdr) {
    if (tdr==null) return null;// throw new IllegalArgumentException("tdr must not be null");
    TdrGenerationRule t = new TdrGenerationRule();
    t.getStaticRules().addAll  (BeanConverterUtil.<TdrStaticRule,StaticTdr>toDataModels(tdr.getStatic()));
    t.getDynamicRules().addAll  (BeanConverterUtil.<TdrDynamicRule,DynamicTdr>toDataModels(tdr.getDynamic()));
    return t;
  }
View Full Code Here

Examples of com.alu.e3.data.model.sub.TdrGenerationRule

   * @throws Exception
   */
  @Test
  public void testAuthTDRs() throws Exception{
    // Add some tdr rules to the Auth and make sure they make it into the billing tdr
    TdrGenerationRule genRule = getBasicTestRule();
    auth.setTdrGenerationRule(genRule);

    requestProcessor.process(exchange);

    exchange.setProperty(ExchangeConstantKeys.E3_GOT_SB_RESPONSE.toString(), Boolean.TRUE);
View Full Code Here

Examples of com.alu.e3.data.model.sub.TdrGenerationRule

   * @throws Exception
   */
  @Test
  public void testApiTDRs() throws Exception{
    // Add some tdr rules to the Api and make sure they make it into the billing tdr
    TdrGenerationRule genRule = getBasicTestRule();
    api.setTdrGenerationRule(genRule);

    requestProcessor.process(exchange);
    exchange.setProperty(ExchangeConstantKeys.E3_GOT_SB_RESPONSE.toString(), Boolean.TRUE);

View Full Code Here

Examples of com.alu.e3.data.model.sub.TdrGenerationRule

   * @throws Exception
   */
  @Test
  public void testPolicyTDRs() throws Exception{
    // Add some tdr rules to a Policy and make sure they make it into the billing tdr
    TdrGenerationRule genRule = getBasicTestRule();
    policy1.setTdrGenerationRule(genRule);

    requestProcessor.process(exchange);
    exchange.setProperty(ExchangeConstantKeys.E3_GOT_SB_RESPONSE.toString(), Boolean.TRUE);

View Full Code Here

Examples of com.alu.e3.data.model.sub.TdrGenerationRule

   * @throws Exception
   */
  @Test
  public void testCommonTdrRules() throws Exception{
    // Add some tdr rules to a Policy and make sure they make it into the billing tdr
    TdrGenerationRule genRule = getBasicTestRule();
    // Add another kind of tdr
    TdrGenerationRule quotaRule = new TdrGenerationRule();
    TDRDataService.addNewTdrGenerationRule(exchange, quotaRule, "apiRateLimit");

    // Add some rule that will apply to all TDRs
    genRule.getStaticRules().add(TestHelper.getStaticRule("COMMON-STATIC", "COMMON-STATIC-VALUE", null));
    exchange.getIn().setHeader("COMMON-DYN-HEAD", "COMMON-DYN-HEAD-VALUE");
View Full Code Here

Examples of com.alu.e3.data.model.sub.TdrGenerationRule

   * @throws Exception
   */
  @Test
  public void testMissingStaticValueAndProperty() throws Exception{
    // Add some tdr rules to a Policy and make sure they make it into the billing tdr
    TdrGenerationRule genRule = getBasicTestRule();
    genRule.getStaticRules().add(TestHelper.getStaticRule("STATIC-NAME", null, null, "Billing"));
    api.setTdrGenerationRule(genRule);

    requestProcessor.process(exchange);
    exchange.setProperty(ExchangeConstantKeys.E3_GOT_SB_RESPONSE.toString(), Boolean.TRUE);

View Full Code Here

Examples of com.alu.e3.data.model.sub.TdrGenerationRule

   * @throws Exception
   */
  @Test
  public void testDuplicateRunRequest() throws Exception{
    // Add some tdr rules to a Policy and make sure they make it into the billing tdr
    TdrGenerationRule genRule = getBasicTestRule();
    genRule.getStaticRules().add(TestHelper.getStaticRule("STATIC-NAME", null, null, "Billing"));
    api.setTdrGenerationRule(genRule);

    requestProcessor.process(exchange);
    testPostRequest();
    TDRDataService.clean(exchange);
View Full Code Here

Examples of com.alu.e3.data.model.sub.TdrGenerationRule

   * This test should make sure that no request rules are activated on if it is a response
   */
  @Test
  public void testRunRequestProcOnResponse() throws Exception{
    // Add some tdr rules to a Policy and make sure they make it into the billing tdr
    TdrGenerationRule genRule = getBasicTestRule();
    genRule.getStaticRules().add(TestHelper.getStaticRule("STATIC-NAME", null, null, "Billing"));
    api.setTdrGenerationRule(genRule);
    exchange.setProperty(ExchangeConstantKeys.E3_GOT_SB_RESPONSE.toString(), Boolean.TRUE);

    requestProcessor.process(exchange);
    testRequestNotRun();
View Full Code Here

Examples of com.alu.e3.data.model.sub.TdrGenerationRule

   * This test should make sure that no response rules are activated on if it is a request
   */
  @Test
  public void testRunResponseProcOnRequest()throws Exception{
    // Add some tdr rules to a Policy and make sure they make it into the billing tdr
    TdrGenerationRule genRule = getBasicTestRule();
    genRule.getStaticRules().add(TestHelper.getStaticRule("STATIC-NAME", null, null, "Billing"));
    api.setTdrGenerationRule(genRule);

    responseProcessor.process(exchange);

    testResponseNotRun();
View Full Code Here

Examples of com.alu.e3.data.model.sub.TdrGenerationRule

   * @throws Exception
   */
  @Test
  public void testDuplicateRunResponse() throws Exception{
    // Add some tdr rules to a Policy and make sure they make it into the billing tdr
    TdrGenerationRule genRule = getBasicTestRule();
    genRule.getStaticRules().add(TestHelper.getStaticRule("STATIC-NAME", null, null, "Billing"));
    api.setTdrGenerationRule(genRule);

    exchange.setProperty(ExchangeConstantKeys.E3_GOT_SB_RESPONSE.toString(), Boolean.TRUE);
    responseProcessor.process(exchange);
    TDRDataService.clean(exchange);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.