removing unused db file
[policy/engine.git] / ecomp-sdk-app / src / test / java / org / openecomp / portalapp / service / ProfileServiceTest.java
1 package org.openecomp.portalapp.service;
2
3 import java.util.List;
4
5 import org.junit.Assert;
6 import org.junit.Test;
7 import org.openecomp.portalsdk.core.MockApplicationContextTestSuite;
8 import org.openecomp.portalsdk.core.domain.Profile;
9 import org.openecomp.portalsdk.core.domain.User;
10 import org.openecomp.portalsdk.core.service.ProfileService;
11 import org.openecomp.portalsdk.core.service.UserProfileService;
12 import org.springframework.beans.factory.annotation.Autowired;
13
14
15 public class ProfileServiceTest extends MockApplicationContextTestSuite {
16         
17         @Autowired
18         ProfileService service;
19         
20         @Autowired
21         UserProfileService userProfileService;
22         
23         @Test
24         public void testFindAll() {
25                 
26                 List<Profile> profiles = service.findAll();
27                 Assert.assertTrue(profiles.size() > 0);
28         }
29
30         @Test
31         public void testFindAllActive() {
32                                 
33                 List<User> users = userProfileService.findAllActive();
34                 List<User> activeUsers = userProfileService.findAllActive();
35                 Assert.assertTrue(users.size() - activeUsers.size() >= 0);
36         }
37 }