Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions test/unit/app/femr/data/models/mysql/DatabaseStatusTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package unit.app.femr.data.models.mysql;

import femr.data.models.mysql.DatabaseStatus;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;

public class DatabaseStatusTest {
DatabaseStatus ds;

@Before
public void setUp() {
ds = new DatabaseStatus();
}

@Test
public void checkId(){
ds.setId(123);
assertEquals(123, ds.getId());
}

@Test
public void checkName(){
ds.setName("very cool database");
assertEquals("very cool database", ds.getName());
}

@Test
public void checkValue(){
ds.setValue("connected");
assertEquals("connected", ds.getValue());
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the tests look good, they test exactly what we need right now

33 changes: 33 additions & 0 deletions test/unit/app/femr/data/models/mysql/KitStatusTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package unit.app.femr.data.models.mysql;

import femr.data.models.mysql.KitStatus;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;

public class KitStatusTest {
KitStatus ks;

@Before
public void setUp() {
ks = new KitStatus();
}

@Test
public void checkId(){
ks.setId(123);
assertEquals(123, ks.getId());
}

@Test
public void checkName(){
ks.setName("KitA");
assertEquals("KitA", ks.getName());
}

@Test
public void checkValue(){
ks.setValue("deployed");
assertEquals("deployed", ks.getValue());
}
}
33 changes: 33 additions & 0 deletions test/unit/app/femr/data/models/mysql/KitUpdateTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package unit.app.femr.data.models.mysql;

import femr.data.models.mysql.KitUpdate;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;

public class KitUpdateTest {
KitUpdate ku;

@Before
public void setUp() {
ku = new KitUpdate();
}

@Test
public void checkId(){
ku.setId(123);
assertEquals(123, ku.getId());
}

@Test
public void checkName(){
ku.setName("new schema update");
assertEquals("new schema update", ku.getName());
}

@Test
public void checkValue(){
ku.setValue("completed");
assertEquals("completed", ku.getValue());
}
}
34 changes: 34 additions & 0 deletions test/unit/app/femr/data/models/mysql/NetworkStatusTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package unit.app.femr.data.models.mysql;

import femr.data.models.mysql.NetworkStatus;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;

public class NetworkStatusTest {
NetworkStatus nt;

@Before
public void setUp() {
nt = new NetworkStatus();
}

@Test
public void checkId(){
nt.setId(123);
assertEquals(123, nt.getId());
}

@Test
public void checkName(){
nt.setName("NetworkA");
assertEquals("NetworkA", nt.getName());
}

@Test
public void checkValue(){
nt.setValue("connected");
assertEquals("connected", nt.getValue());
}

}