- static PreparedQueryObject testObject;
-
- static String appName = "TestApp";
- static String userId = "TestUser";
- static String password = "TestPassword";
- static String authData = userId + ":" + password;
- static String wrongAuthData = userId + ":" + "pass";
- static String authorization = new String(Base64.encode(authData.getBytes()));
- static String wrongAuthorization = new String(Base64.encode(wrongAuthData.getBytes()));
- static boolean isAAF = false;
- static UUID uuid = UUID.fromString("abc66ccc-d857-4e90-b1e5-df98a3d40ce6");
- static String keyspaceName = "testcassa";
- static String tableName = "employees";
- static String xLatestVersion = "X-latestVersion";
- static String onboardUUID = null;
-
- @BeforeClass
- public static void init() throws Exception {
- System.out.println("Testing CachingUtil class");
- try {
- createKeyspace();
- } catch (Exception e) {
- e.printStackTrace();
- throw new Exception("Unable to initialize before CachingUtil test class. " + e.getMessage());
- }
- }
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {
- testObject = new PreparedQueryObject();
- testObject.appendQueryString("DROP KEYSPACE IF EXISTS " + keyspaceName);
- MusicCore.eventualPut(testObject);
+ RestMusicLocksAPI lock = new RestMusicLocksAPI();
+ RestMusicDataAPI data = new RestMusicDataAPI();
+ static PreparedQueryObject testObject;
+
+ static String appName = TestsUsingCassandra.appName;
+ static String userId = TestsUsingCassandra.userId;
+ static String password = TestsUsingCassandra.password;
+ static String authData = TestsUsingCassandra.authData;
+ static String authorization = TestsUsingCassandra.authorization;
+ static boolean isAAF = TestsUsingCassandra.isAAF;
+ static UUID uuid = TestsUsingCassandra.uuid;
+ static String keyspaceName = TestsUsingCassandra.keyspaceName;
+ static String tableName = TestsUsingCassandra.tableName;
+ static String onboardUUID = null;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Testing CachingUtil class");
+ try {
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new Exception("Unable to initialize before TestRestMusicData test class. " + e.getMessage());
+ }
+ }
+
+ @After
+ public void afterEachTest( ) throws MusicServiceException {
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ testObject = new PreparedQueryObject();
+ testObject.appendQueryString("DROP KEYSPACE IF EXISTS " + keyspaceName);
+ MusicCore.eventualPut(testObject);
+ }
+
+ @Test
+ public void test_verifyOnboard() throws Exception {
+ System.out.println("Testing onboarding of app");
+ CachingUtil cache = new CachingUtil();
+ cache.initializeAafCache();
+ Map<String, Object> authMap = CachingUtil.verifyOnboarding(appName, userId, password);
+ assertEquals(0, authMap.size());