Skip to content

Commit

Permalink
Quick clean-up, response to Bardia and Tony's reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcurkovic committed Nov 4, 2023
1 parent 68ba31e commit ecd7dda
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/main/java/com/opinionowl/opinionowl/models/AppUser.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ public boolean removeSurvey (Long surveyId) {
@Override
public String toString(){
String user = "User ID: " + id + "Username: " + username + "Password: " + password;
user += "\n List of Surveys: ";
user += "\n-----Surveys -----";
for (Survey s: listSurveys) {
user += "\n" + s.toString();

}
return user;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
import lombok.Getter;
import lombok.Setter;

import java.sql.Array;
import java.util.ArrayList;

/**
* The class used to describe the multiple choice questions.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
import com.opinionowl.opinionowl.models.*;
import com.opinionowl.opinionowl.repos.SurveyRepository;
import com.opinionowl.opinionowl.repos.UserRepository;
import org.h2.engine.User;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.List;

@SpringBootTest
public class SurveyTest {
public class IntegrationTest {
@Autowired
private SurveyRepository surveyRepository;

Expand All @@ -22,7 +21,7 @@ public class SurveyTest {
* Test method for the Survey class.
*/
@Test
public void testPersist() {
public void testDatabaseIntegration() {
AppUser u1 = new AppUser("Test", "123");
Survey survey = new Survey(u1, "TEST_SURVEY");
u1.addSurvey(survey);
Expand Down

0 comments on commit ecd7dda

Please sign in to comment.