From bb9ea7529f5df4be6d88fa6d4811ebccf0be3f63 Mon Sep 17 00:00:00 2001 From: Filip Izydorczyk Date: Thu, 1 Oct 2020 17:08:10 +0200 Subject: [PATCH] Added what commision tests needst to be written --- .../services/CommisionServiceTest.java | 49 +++++++++++++++++++ .../plannaplan/services/UserServiceTest.java | 2 +- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100755 buisnesslogic/src/test/java/com/plannaplan/services/CommisionServiceTest.java diff --git a/buisnesslogic/src/test/java/com/plannaplan/services/CommisionServiceTest.java b/buisnesslogic/src/test/java/com/plannaplan/services/CommisionServiceTest.java new file mode 100755 index 0000000..dfa5467 --- /dev/null +++ b/buisnesslogic/src/test/java/com/plannaplan/services/CommisionServiceTest.java @@ -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); + } + +} diff --git a/buisnesslogic/src/test/java/com/plannaplan/services/UserServiceTest.java b/buisnesslogic/src/test/java/com/plannaplan/services/UserServiceTest.java index 5a85627..b944a7b 100755 --- a/buisnesslogic/src/test/java/com/plannaplan/services/UserServiceTest.java +++ b/buisnesslogic/src/test/java/com/plannaplan/services/UserServiceTest.java @@ -27,7 +27,7 @@ public class UserServiceTest { public static String TEST_USER_SUERNAME = "Kovalsky"; @Autowired - UserService userService; + private UserService userService; @Before public void initialize() {