From 6b3f0afa0f9bfff7fa5321c317d0335e9bf364e9 Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Tue, 25 Dec 2018 14:38:25 -0500 Subject: [PATCH] =?UTF-8?q?Kayak=20=E9=9D=A2=E8=AF=95=E9=A2=98=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=20Unit=20=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../codebank/interview/tests/KayakTest.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/test/java/com/ossez/codebank/interview/tests/KayakTest.java diff --git a/src/test/java/com/ossez/codebank/interview/tests/KayakTest.java b/src/test/java/com/ossez/codebank/interview/tests/KayakTest.java new file mode 100644 index 0000000..3f7c3e7 --- /dev/null +++ b/src/test/java/com/ossez/codebank/interview/tests/KayakTest.java @@ -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"); + + } + +}