Kayak 面试题中的 Unit 测试
This commit is contained in:
parent
58b84c1fdb
commit
6b3f0afa0f
|
@ -0,0 +1,33 @@
|
|||
package com.ossez.codebank.interview.tests;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.ossez.codebank.interview.KayakRobotMovement;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author YuCheng
|
||||
*
|
||||
*/
|
||||
public class KayakTest {
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(KayakTest.class);
|
||||
|
||||
/**
|
||||
* testGetCoordinates
|
||||
*/
|
||||
@Test
|
||||
public void testGetCoordinates() {
|
||||
logger.debug("TEST Get Coordinat ");
|
||||
logger.debug("LFFF - [{}]", KayakRobotMovement.getCoordinates("LFFF"));
|
||||
|
||||
assertEquals(KayakRobotMovement.getCoordinates("FF"), "0,2");
|
||||
assertEquals(KayakRobotMovement.getCoordinates("LFFFRFFFRRFFF"), "-3,0");
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue