Search in sources :

Example 6 with FixedTimeFrameAlgorithmMigrationStep

use of com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.FixedTimeFrameAlgorithmMigrationStep in project mule-migration-assistant by mulesoft.

the class FixedTimeAlgorithmMigrationStepTestCase method multipleRateLimitElementsSpikeControl.

@Test
public void multipleRateLimitElementsSpikeControl() {
    FixedTimeFrameAlgorithmMigrationStep step = new FixedTimeFrameAlgorithmMigrationStep();
    step.setApplicationModel(appModel);
    Element element = createPolicy(2, FIXED_TIME_FRAME_ALGORITHM_TAG_NAME, false);
    step.execute(element, reportMock);
    assertConfigElement(element, 2, false);
    assertOperationElements(element, 2, false);
    assertNamespaces(element);
    verify(reportMock).report("throttling.throttlingMultipleTiersNotSupported", element, element);
    assertPolicyName(element);
}
Also used : Element(org.jdom2.Element) FixedTimeFrameAlgorithmMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.FixedTimeFrameAlgorithmMigrationStep) Test(org.junit.Test)

Aggregations

FixedTimeFrameAlgorithmMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.FixedTimeFrameAlgorithmMigrationStep)6 Element (org.jdom2.Element)5 Test (org.junit.Test)5 DelayResponseTagMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.DelayResponseTagMigrationStep)1 DiscardResponseTagMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.DiscardResponseTagMigrationStep)1 PolicyTagMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.PolicyTagMigrationStep)1 RateLimitTagMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.RateLimitTagMigrationStep)1 SlaBasedAlgorithmMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.SlaBasedAlgorithmMigrationStep)1 ThrottleTagMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.ThrottleTagMigrationStep)1 Dependency (com.mulesoft.tools.migration.project.model.pom.Dependency)1 PomModel (com.mulesoft.tools.migration.project.model.pom.PomModel)1 MigrationStep (com.mulesoft.tools.migration.step.MigrationStep)1 ArrayList (java.util.ArrayList)1