SuperX-Kernmodul
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

59 lines
1.6 KiB

package de.superx.transfer;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.BeforeClass;
import org.junit.Test;
public class TargetTest {
private static Target target;
private final String NAME = "Name";
private final String HOST = "Host";
private final String USER_ID = "12";
private final String PASSWORD = "password";
private final String TARGET_PATH ="../path";
@BeforeClass
public static void testConstructor() {
target = new Target(null);
assertNotNull("object has been initialized", target);
}
@Test
public void testSetGetName() {
target.setName(this.NAME);
String result = target.getName();
assertEquals("method returns set parameter", this.NAME, result);
}
@Test
public void testSetGetHost() {
target.setHost(this.HOST);
String result = target.getHost();
assertEquals("method returns set parameter", this.HOST, result);
}
@Test
public void testSetGetPassword() {
target.setPassword(this.PASSWORD);
String result = target.getPassword();
assertEquals("method returns set parameter", this.PASSWORD, result);
}
@Test
public void testSetGetTargetPath() {
target.setTargetPath(this.TARGET_PATH);
String result = target.getTargetPath();
assertEquals("method returns set parameter", this.TARGET_PATH, result);
}
@Test
public void testSetGetUserId() {
target.setUserid(this.USER_ID);
String result = target.getUserid();
assertEquals("method returns set parameter", this.USER_ID, result);
}
}