不使用循环的输出测试程序

This commit is contained in:
YuCheng Hu 2018-12-25 21:20:50 -05:00
parent aa0b09e306
commit 79296322bf
1 changed files with 30 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.ossez.codebank.interview.KayakCountUpDown;
import com.ossez.codebank.interview.KayakRobotMovement;
/**
@ -18,7 +19,10 @@ public class KayakTest {
private final static Logger logger = LoggerFactory.getLogger(KayakTest.class);
/**
* https://www.cwiki.us/display/ITCLASSIFICATION/Robot+Movement
*
* testGetCoordinates
*
*/
@Test
public void testGetCoordinates() {
@ -31,4 +35,30 @@ public class KayakTest {
}
/**
* https://www.cwiki.us/display/ITCLASSIFICATION/Count+Up+Down
*
* CountUpDown
*/
@Test
public void testCountUpDown() {
logger.debug("TEST Count Up and Down ");
// 2 -5
logger.debug("[2 -> 5]");
logger.debug("UP - {}", new KayakCountUpDown().countUp(2, 5));
logger.debug("UP & DOWN - {}", new KayakCountUpDown().countUpDown(2, 5));
// 0 - 5
logger.debug("[0 -> 5]");
logger.debug("UP - {}", new KayakCountUpDown().countUp(0, 5));
logger.debug("UP & DOWN - {}", new KayakCountUpDown().countUpDown(0, 5));
// -1 - 5
logger.debug("[-1 -> 5]");
logger.debug("UP - {}", new KayakCountUpDown().countUp(-1, 5));
logger.debug("UP & DOWN - {}", new KayakCountUpDown().countUpDown(-1, 5));
}
}