Added what commision tests needst to be written

This commit is contained in:
Filip Izydorczyk 2020-10-01 17:08:10 +02:00
parent 398a84854f
commit bb9ea7529f
2 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,49 @@
package com.plannaplan.services;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringRunner;
import static org.junit.Assert.assertTrue;
import com.plannaplan.entities.User;
import com.plannaplan.types.UserRoles;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(SpringRunner.class)
@SpringBootTest
@ContextConfiguration
public class CommisionServiceTest {
// @Autowired
// private CommisionService service;
@Autowired
private UserService userService;
@Before
public void initialize() {
User testUser = new User(UserServiceTest.TEST_USER_NAME, UserServiceTest.TEST_USER_SUERNAME,
UserServiceTest.TEST_USER_MAIL, UserRoles.TEST_USER);
this.userService.save(testUser);
}
@Test
public void shouldSaveCommision() {
assertTrue("Not implemented", false);
}
@Test
public void shouldGetUserCommisions() {
assertTrue("Not implemented", false);
}
@Test
public void shouldGetNewestCommision() {
assertTrue("Not implemented", false);
}
}

View File

@ -27,7 +27,7 @@ public class UserServiceTest {
public static String TEST_USER_SUERNAME = "Kovalsky"; public static String TEST_USER_SUERNAME = "Kovalsky";
@Autowired @Autowired
UserService userService; private UserService userService;
@Before @Before
public void initialize() { public void initialize() {