@@ -231,31 +231,4 @@ public void testAppWithQuotaBasedOnAPIPath() throws AppException {
231231 assertEquals (restr1 .getConfig ().get ("period" ), "week" );
232232 assertEquals (restr1 .getConfig ().get ("per" ), "1" );
233233 }
234-
235- @ Test
236- public void testAppWithQuotaBasedOnMultipleAPIPaths () throws AppException {
237- String testFile = JSONClientAppAdapterTest .class .getResource (testPackage + "/AppWithQuotaPerMultipleAPIPaths.json" ).getPath ();
238- assertTrue (new File (testFile ).exists (), "Test file doesn't exists" );
239-
240- AppImportParams importParams = new AppImportParams ();
241- importParams .setConfig (testFile );
242- importParams .setHostname ("localhost" );
243- importParams .setUsername ("apiadmin" );
244- importParams .setPassword (Utils .getEncryptedPassword ());
245- ClientAppAdapter adapter = new ClientAppConfigAdapter (importParams );
246-
247- List <ClientApplication > apps = adapter .getApplications ();
248- assertEquals (apps .size (), 1 , "Expected 1 app returned from the Adapter" );
249- APIQuota appQuota = apps .get (0 ).getAppQuota ();
250- assertNotNull (appQuota , "appQuota is null" );
251- assertNotNull (appQuota .getRestrictions (), "appQuota restrictions are null" );
252- assertEquals (appQuota .getRestrictions ().size (), 2 , "Expected two restrictions" );
253-
254- QuotaRestriction firstRestriction = appQuota .getRestrictions ().get (0 );
255- QuotaRestriction secondRestriction = appQuota .getRestrictions ().get (1 );
256-
257- assertEquals (firstRestriction .getApiId (), "e4ded8c8-0a40-4b50-bc13-552fb7209150" );
258- assertEquals (secondRestriction .getApiId (), "11111111-2222-3333-4444-555555555555" );
259- assertNotEquals (firstRestriction .getApiId (), secondRestriction .getApiId (), "Each apiPath must resolve to its own API" );
260- }
261234}
0 commit comments