Added old project initial commit
All checks were successful
Locusworks Team/lsproject/pipeline/head This commit looks good

This commit is contained in:
2021-10-18 19:26:42 -05:00
parent dd103f0e5d
commit 40e2af6a93
25 changed files with 2414 additions and 0 deletions

View File

@ -0,0 +1,49 @@
package object;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
import net.locusworks.lsproject.object.Connection;
public class ConnectionTest {
private Connection testConnection;
@Before
public void setUpBeforeTest(){
testConnection = new Connection("1", "2", 4);
}
@Test
public void testGetCost() {
assertEquals(4, testConnection.getCost());
}
@Test
public void testSetCost() {
testConnection.setCost(21);
assertEquals(21, testConnection.getCost());
}
@Test
public void testGetFirstParticipantAddress() {
assertEquals("1", testConnection.getFirstParticipantAddress());
}
@Test
public void testGetSecondParticipantAddress() {
assertEquals("2", testConnection.getSecondParticipantAddress());
}
@Test
public void testSetParticipants() {
testConnection.setParticipants("100", "200");
assertEquals("100", testConnection.getFirstParticipantAddress());
assertEquals("200", testConnection.getSecondParticipantAddress());
}
}