Skip to content
Snippets Groups Projects
Commit f8033f98 authored by tudtianus's avatar tudtianus
Browse files

#83 feat: handled warnings

parent 9d1c80bb
No related branches found
No related tags found
No related merge requests found
......@@ -31,8 +31,7 @@ public class JournalDAOImplTest {
public void createJournal() {
// Create Journal
Journal createJournal = testJournal;
journalDAO.createJournal(createJournal);
journalDAO.createJournal(testJournal);
connection.connect();
......@@ -108,13 +107,12 @@ public class JournalDAOImplTest {
@Test
public void deleteJournal() {
Journal deleteJournal = testJournal;
//createJournal
connection.connect();
// build and execute request
create(deleteJournal);
create(testJournal);
//check if Journal was added
ArrayList<Journal> resultJournals = getJournals();
......@@ -138,14 +136,13 @@ public class JournalDAOImplTest {
@Test
public void getJournal() {
//create Journal
Journal getJournal = testJournal;
//createJournal
connection.connect();
// build and execute request
create(getJournal);
create(testJournal);
//get that Journal
Journal resultJournal = journalDAO.getJournal(testId);
......@@ -224,8 +221,7 @@ public class JournalDAOImplTest {
connection.connect();
//create Journal
Journal closeJournal = testJournal;
create(closeJournal);
create(testJournal);
Journal resultJournal = getJournals().get(0);
......
......@@ -12,14 +12,14 @@ import static org.junit.Assert.assertFalse;
public class LinkDAOImplTest {
MysqlConnect connection = new MysqlConnect();
LinkDAO linkDAO = new LinkDAOImpl();
String testId = "-1";
String testProjectDescription = "testproject";
String testName = "testname";
String testLink = "https://www.test.de";
Link testLinkObj = new Link(testId, testProjectDescription, testName, testLink);
private final MysqlConnect connection = new MysqlConnect();
private final LinkDAO linkDAO = new LinkDAOImpl();
private final String testId = "-1";
private final String testProjectDescription = "testproject";
private final String testName = "testname";
private final String testLink = "https://www.test.de";
private final Link testLinkObj = new Link(testId, testProjectDescription, testName, testLink);
@Test
public void addLink() {
......
......@@ -80,9 +80,7 @@ public class ProjectDescriptionImplDAOTest {
public void getDescriptionSI() {
connection.connect();
ProjectDescription getDescription = testProjectDescription;
create(getDescription);
create(testProjectDescription);
ProjectDescription result = descriptionDAO.getDescription(new StudentIdentifier(testProjekt, testStudent));
......@@ -99,9 +97,7 @@ public class ProjectDescriptionImplDAOTest {
public void getDescriptionID() {
connection.connect();
ProjectDescription getDescription = testProjectDescription;
create(getDescription);
create(testProjectDescription);
ProjectDescription result = descriptionDAO.getDescription(testId);
......@@ -118,9 +114,7 @@ public class ProjectDescriptionImplDAOTest {
public void deleteDescription() {
connection.connect();
ProjectDescription deleteDescription = testProjectDescription;
create(deleteDescription);
create(testProjectDescription);
ArrayList<ProjectDescription> resultDescriptions = getProjectDescription();
......@@ -141,9 +135,7 @@ public class ProjectDescriptionImplDAOTest {
public void closeDescription() {
connection.connect();
ProjectDescription closeDescription = testProjectDescription;
create(closeDescription);
create(testProjectDescription);
ArrayList<ProjectDescription> resultDescriptions = getProjectDescription();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment