From 4df8e4e6695f3be584932404e019216a8cfb0e1a Mon Sep 17 00:00:00 2001 From: richie Date: Fri, 9 Aug 2019 16:36:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91=E8=80=85=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E9=93=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/fanruan/api/FineKit.java | 2 +- .../java/com/fanruan/api/FineKitTest.java | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src/test/java/com/fanruan/api/FineKitTest.java diff --git a/src/main/java/com/fanruan/api/FineKit.java b/src/main/java/com/fanruan/api/FineKit.java index 750f597..0dae38a 100644 --- a/src/main/java/com/fanruan/api/FineKit.java +++ b/src/main/java/com/fanruan/api/FineKit.java @@ -15,7 +15,7 @@ public class FineKit { static { Properties properties = new Properties(); try { - properties.load(FineKit.class.getResourceAsStream("version.properties")); + properties.load(FineKit.class.getResourceAsStream("/version.properties")); version = properties.getProperty("version"); } catch (IOException ignore) { version = "1.0"; diff --git a/src/test/java/com/fanruan/api/FineKitTest.java b/src/test/java/com/fanruan/api/FineKitTest.java new file mode 100644 index 0000000..809c6a2 --- /dev/null +++ b/src/test/java/com/fanruan/api/FineKitTest.java @@ -0,0 +1,19 @@ +package com.fanruan.api; + +import org.junit.Assert; +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019-08-09 + */ +public class FineKitTest { + + @Test + public void version() { + Assert.assertEquals("1.0", FineKit.version()); + } +} \ No newline at end of file