* org.onap.music
* ===================================================================
* Copyright (c) 2017 AT&T Intellectual Property
+ * Modifications Copyright (C) 2019 IBM.
* ===================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
@Test
- public void testConvertToCQLDataType() {
+ public void testConvertToCQLDataType() throws Exception {
Map<String,Object> myMap = new HashMap<String,Object>();
myMap.put("name","tom");
assertEquals(MusicUtil.convertToCQLDataType(DataType.varchar(),"Happy People"),"'Happy People'");
}
@Test
- public void testJsonMaptoSqlString() {
+ public void testJsonMaptoSqlString() throws Exception {
Map<String,Object> myMap = new HashMap<>();
myMap.put("name","tom");
myMap.put("value",5);
}
@Test
- public void testSetErrorResponse() {
- Map<String,Object> myMap = new HashMap<>();
- myMap.put("name","tom");
- Map<String,HashMap<String,Object>> result = MusicUtil.setErrorResponse(new MusicServiceException("This is the error"));
- Map<String,Object> testMap = (Map<String,Object>) result.get("result");
- Map<String,Object> error = (Map<String,Object>) testMap.get("error");
- assertTrue(error.containsKey("error-description"));
+ public void testIsValidConsistency(){
+ assertTrue(MusicUtil.isValidConsistency("ALL"));
+ assertFalse(MusicUtil.isValidConsistency("TEST"));
}
}