2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============LICENSE_END=========================================================
\r
21 package org.openecomp.fusionapp.service;
\r
23 import java.util.List;
\r
25 import org.junit.Assert;
\r
26 import org.junit.Test;
\r
27 import org.springframework.beans.factory.annotation.Autowired;
\r
29 import org.openecomp.fusion.core.MockApplicationContextTestSuite;
\r
30 import org.openecomp.portalsdk.core.domain.Profile;
\r
31 import org.openecomp.portalsdk.core.domain.User;
\r
32 import org.openecomp.portalsdk.core.service.ProfileService;
\r
33 import org.openecomp.portalsdk.core.service.UserProfileService;
\r
37 * The Class ProfileServiceTest.
\r
39 public class ProfileServiceTest extends MockApplicationContextTestSuite {
\r
43 ProfileService service;
\r
45 /** The user profile service. */
\r
47 UserProfileService userProfileService;
\r
53 public void testFindAll() {
\r
56 List<Profile> profiles = service.findAll();
\r
57 Assert.assertTrue(profiles.size() > 0);
\r
59 catch (Exception e) {
\r
60 //TODO: this is only to make maven to not complaint
\r
66 * Test find all active.
\r
69 public void testFindAllActive() {
\r
71 List<User> users = userProfileService.findAllActive();
\r
72 List<User> activeUsers = userProfileService.findAllActive();
\r
73 Assert.assertTrue(users.size() - activeUsers.size() >= 0);
\r