diff --git a/src/org/april/hebdobot/pastebin/PastebinSettings.java b/src/org/april/hebdobot/pastebin/PastebinSettings.java index 020471f..fd7874b 100644 --- a/src/org/april/hebdobot/pastebin/PastebinSettings.java +++ b/src/org/april/hebdobot/pastebin/PastebinSettings.java @@ -21,7 +21,7 @@ package org.april.hebdobot.pastebin; import org.apache.commons.lang3.StringUtils; /** - * The Class IdenticaSettings. + * The Class PatebinSettings. */ public class PastebinSettings { diff --git a/test/org/april/hebdobot/bot/stats/ReviewDatasFileTest.java b/test/org/april/hebdobot/bot/stats/ReviewDatasFileTest.java new file mode 100644 index 0000000..fc54dfc --- /dev/null +++ b/test/org/april/hebdobot/bot/stats/ReviewDatasFileTest.java @@ -0,0 +1,63 @@ +/** + * Copyright (C) 2018-2019 Christian Pierre MOMON + * + * This file is part of (April) Hebdobot. + * + * Hebdobot is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Hebdobot is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Hebdobot. If not, see + */ +package org.april.hebdobot.bot.stats; + +import java.io.File; + +import org.apache.log4j.BasicConfigurator; +import org.junit.BeforeClass; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * The Class ReviewDatasFileTest. + */ +public class ReviewDatasFileTest +{ + private static final Logger logger = LoggerFactory.getLogger(ReviewDatasFileTest.class); + + /** + * Test load. + * + * @throws Exception + * the exception + */ + @Test + public void testLoad() throws Exception + { + System.out.println("================"); + ReviewDatas datas = ReviewDatasFile.load(new File("test/org/april/hebdobot/bot/stats/reviewstats.csv")); + + for (ReviewData data : datas) + { + System.out.println(data.toString()); + } + } + + /** + * Inits the. + */ + @BeforeClass + public static void init() + { + BasicConfigurator.configure(); + logger.info("Basic log configuration done."); + } +} diff --git a/test/org/april/hebdobot/reviewstats/ReviewStatsTest.java b/test/org/april/hebdobot/bot/stats/ReviewStatsReporterTest.java similarity index 80% rename from test/org/april/hebdobot/reviewstats/ReviewStatsTest.java rename to test/org/april/hebdobot/bot/stats/ReviewStatsReporterTest.java index 6cf8749..c96ad5d 100644 --- a/test/org/april/hebdobot/reviewstats/ReviewStatsTest.java +++ b/test/org/april/hebdobot/bot/stats/ReviewStatsReporterTest.java @@ -16,17 +16,13 @@ * You should have received a copy of the GNU Affero General Public License * along with Hebdobot. If not, see */ -package org.april.hebdobot.reviewstats; +package org.april.hebdobot.bot.stats; import java.io.File; import java.time.LocalDateTime; import org.apache.commons.lang3.StringUtils; import org.apache.log4j.BasicConfigurator; -import org.april.hebdobot.bot.stats.ReviewData; -import org.april.hebdobot.bot.stats.ReviewDatas; -import org.april.hebdobot.bot.stats.ReviewDatasFile; -import org.april.hebdobot.bot.stats.ReviewStatsReporter; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; @@ -34,29 +30,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * The Class ReviewStatsTest. + * The Class ReviewStatsReporterTest. */ -public class ReviewStatsTest +public class ReviewStatsReporterTest { - private static final Logger logger = LoggerFactory.getLogger(ReviewStatsTest.class); - - /** - * Test load. - * - * @throws Exception - * the exception - */ - @Test - public void testLoad() throws Exception - { - System.out.println("================"); - ReviewDatas datas = ReviewDatasFile.load(new File("test/org/april/hebdobot/reviewstats/reviewstats.csv")); - - for (ReviewData data : datas) - { - System.out.println(data.toString()); - } - } + private static final Logger logger = LoggerFactory.getLogger(ReviewStatsReporterTest.class); /** * Test report duration. @@ -65,10 +43,10 @@ public class ReviewStatsTest * the exception */ @Test - public void testReportDuration() throws Exception + public void testReportDuration01() throws Exception { System.out.println("================"); - ReviewDatas datas = ReviewDatasFile.load(new File("test/org/april/hebdobot/reviewstats/reviewstats.csv")); + ReviewDatas datas = ReviewDatasFile.load(new File("test/org/april/hebdobot/bot/stats/reviewstats.csv")); datas.clean(); logger.debug("File loaded."); ReviewData currentReviewData = new ReviewData(LocalDateTime.now(), 12, 17L); @@ -89,7 +67,7 @@ public class ReviewStatsTest public void testReportNewUserCountRecord01() throws Exception { System.out.println("================"); - ReviewDatas datas = ReviewDatasFile.load(new File("test/org/april/hebdobot/reviewstats/reviewstats.csv")); + ReviewDatas datas = ReviewDatasFile.load(new File("test/org/april/hebdobot/bot/stats/reviewstats.csv")); datas.clean(); logger.debug("File loaded."); ReviewData currentReview = new ReviewData(LocalDateTime.now(), 12, 17L); @@ -109,7 +87,7 @@ public class ReviewStatsTest public void testReportNewUserCountRecord02() throws Exception { System.out.println("================"); - ReviewDatas datas = ReviewDatasFile.load(new File("test/org/april/hebdobot/reviewstats/reviewstats.csv")); + ReviewDatas datas = ReviewDatasFile.load(new File("test/org/april/hebdobot/bot/stats/reviewstats.csv")); datas.clean(); logger.debug("File loaded."); ReviewData currentReview = new ReviewData(LocalDateTime.now(), 42000, 17L); @@ -129,7 +107,7 @@ public class ReviewStatsTest public void testReportUserCount() throws Exception { System.out.println("================"); - ReviewDatas datas = ReviewDatasFile.load(new File("test/org/april/hebdobot/reviewstats/reviewstats.csv")); + ReviewDatas datas = ReviewDatasFile.load(new File("test/org/april/hebdobot/bot/stats/reviewstats.csv")); datas.clean(); logger.debug("File loaded."); ReviewData currentReview = new ReviewData(LocalDateTime.now(), 12, 17L); diff --git a/test/org/april/hebdobot/reviewstats/reviewstats.csv b/test/org/april/hebdobot/bot/stats/reviewstats.csv similarity index 100% rename from test/org/april/hebdobot/reviewstats/reviewstats.csv rename to test/org/april/hebdobot/bot/stats/reviewstats.csv