Kayak 面试题中的 Unit 测试

This commit is contained in:
YuCheng Hu 2018-12-25 14:38:25 -05:00
parent 58b84c1fdb
commit 6b3f0afa0f
1 changed files with 33 additions and 0 deletions

View File

@ -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");
}
}