KotlinUnitTest.java 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package com.tedxiong.kotlin;
  2. import org.junit.Test;
  3. import java.util.ArrayList;
  4. import java.util.HashMap;
  5. import java.util.Map;
  6. import static org.junit.Assert.*;
  7. /**
  8. * Example local unit test, which will execute on the development machine (host).
  9. *
  10. * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
  11. */
  12. public class KotlinUnitTest {
  13. private KotlinUnit mUnit = new KotlinUnit();
  14. @Test
  15. public void testLet_0() throws Exception {
  16. assertTrue("testLet_0", mUnit.nameSplit("ted xiong"));
  17. }
  18. @Test
  19. public void testApply_0() throws Exception {
  20. ArrayList<String> space = new ArrayList<>();
  21. assertTrue("testApply_0", mUnit.getDateStr(space));
  22. }
  23. @Test
  24. public void testWith_0() throws Exception {
  25. HashMap<String,String> map = new HashMap<>();
  26. assertTrue("testWith_0", mUnit.getCompileInfo(map));
  27. }
  28. @Test
  29. public void testRun_0() throws Exception {
  30. assertTrue("testRun_0", mUnit.sayHiTo("xiongwei"));
  31. }
  32. @Test
  33. public void testAlso_0() throws Exception {
  34. assertTrue("testAlso_0", mUnit.getCircumference(10));
  35. }
  36. }