diff options
author | Yuli Shlosberg <ys9693@att.com> | 2017-10-22 14:27:51 +0300 |
---|---|---|
committer | Yuli Shlosberg <ys9693@att.com> | 2017-10-22 14:27:51 +0300 |
commit | 00fca27997c4a4a473823c4dc0123c074dac7b50 (patch) | |
tree | 77545d36e06fcb27769d37cb4478c3f4b2730902 /catalog-be | |
parent | a78ce5b07f10c6160152a017675b71cca36fb049 (diff) |
remove neo4j classes
Change-Id: I7a9b781c30d4eb269c19dfdaa5d230807a97f08b
Issue-Id: SDC-487
Signed-off-by: Yuli Shlosberg <ys9693@att.com>
Diffstat (limited to 'catalog-be')
-rw-r--r-- | catalog-be/src/test/java/org/openecomp/sdc/be/user/UserAdminManagerTest.java | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/user/UserAdminManagerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/user/UserAdminManagerTest.java deleted file mode 100644 index 4b01b4fd61..0000000000 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/user/UserAdminManagerTest.java +++ /dev/null @@ -1,91 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdc.be.user; - -import static org.mockito.Matchers.anyObject; -import static org.mockito.Matchers.anyString; -import static org.mockito.Mockito.when; - -import org.junit.Before; -import org.mockito.Mockito; -import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.api.IUsersDAO; -import org.openecomp.sdc.be.dao.impl.Neo4jUsersDAO; -import org.openecomp.sdc.be.resources.data.UserData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; - -import fj.data.Either; - -public class UserAdminManagerTest { - - final IUsersDAO usersDao = Mockito.mock(Neo4jUsersDAO.class); - Gson gson; - - @Before - public void setup() { - Either<UserData, ActionStatus> eitherOk = Either.right(ActionStatus.OK); - gson = new GsonBuilder().setPrettyPrinting().create(); - when(usersDao.getUserData(anyString())).thenReturn(eitherOk); - when(usersDao.saveUserData((UserData) anyObject())).thenReturn(ActionStatus.OK); - when(usersDao.updateUserData((UserData) anyObject())).thenReturn(ActionStatus.OK); - when(usersDao.deleteUserData(anyString())).thenReturn(ActionStatus.OK); - } - - // @Test - // public void testCreateUser() { - // String json = "{\"firstName\": \"James\",\"lastName\": - // \"Brown\",\"userId\": \"jb1234u\",\"email\": - // \"jb1234u@sdc.com\",\"role\": \"ADMIN\"}"; - // UserData user = gson.fromJson(json, UserData.class); - // Either<UserData,ActionStatus> either = - // UserAdminManager.getInstance().createUser(user); - // assertTrue(either.isRight()); - // assertEquals(ActionStatus.OK, either.right().value()); - // } - // - // - // @Test - // public void testCreateUserInvalidEmail() { - // String json = "{\"firstName\": \"James\",\"lastName\": - // \"Brown\",\"userId\": \"jb1234u\",\"email\": \"@sdc.com\",\"role\": - // \"ADMIN\"}"; - // UserData user = gson.fromJson(json, UserData.class); - // Either<UserData,ActionStatus> either = - // UserAdminManager.getInstance().createUser(user); - // assertTrue(either.isRight()); - // assertEquals(ActionStatus.INVALID_EMAIL_ADDRESS, either.right().value()); - // } - // - // @Test - // public void testCreateUserInvalidRole() { - // String json = "{\"firstName\": \"James\",\"lastName\": - // \"Brown\",\"userId\": \"jb1234u\",\"email\": - // \"jb1234u@sdc.com\",\"role\": \"MIN\"}"; - // UserData user = gson.fromJson(json, UserData.class); - // Either<UserData,ActionStatus> either = - // UserAdminManager.getInstance().createUser(user); - // assertTrue(either.isRight()); - // assertEquals(ActionStatus.INVALID_EMAIL_ADDRESS, either.right().value()); - // } - -} |