Search in sources :

Example 1 with UserService

use of com.cas.sim.tis.services.UserService in project TeachingInSimulation by ScOrPiOzzy.

the class RMITest method testGetObject.

@Test
public void testGetObject() throws Exception {
    UserService userService = (UserService) userServiceFactory.getObject();
    Assert.assertNotNull(userService);
    userService.findAll().forEach(System.out::println);
    ResourceService resourceService = (ResourceService) resourceServiceFactory.getObject();
    Assert.assertNotNull(resourceService);
    resourceService.findAll().forEach(System.out::println);
    ElecCompService elecCompService = (ElecCompService) elecCompServiceFactory.getObject();
    Assert.assertNotNull(elecCompService);
    elecCompService.findAll().forEach(System.out::println);
}
Also used : UserService(com.cas.sim.tis.services.UserService) ResourceService(com.cas.sim.tis.services.ResourceService) ElecCompService(com.cas.sim.tis.services.ElecCompService) SpringBootTest(org.springframework.boot.test.context.SpringBootTest) Test(org.junit.Test)

Example 2 with UserService

use of com.cas.sim.tis.services.UserService in project TeachingInSimulation by ScOrPiOzzy.

the class UserAction method deleteUser.

public void deleteUser(int id) {
    UserService service = getService();
    User user = service.findById(id);
    if (user != null) {
        user.setDel(true);
        modifyUser(user);
    }
}
Also used : User(com.cas.sim.tis.entity.User) UserService(com.cas.sim.tis.services.UserService)

Aggregations

UserService (com.cas.sim.tis.services.UserService)2 User (com.cas.sim.tis.entity.User)1 ElecCompService (com.cas.sim.tis.services.ElecCompService)1 ResourceService (com.cas.sim.tis.services.ResourceService)1 Test (org.junit.Test)1 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)1