Rev 6914 | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.erggroup.buildtool.utf;import static org.junit.Assert.*;import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.junit.After;import org.junit.AfterClass;import org.junit.Before;import org.junit.BeforeClass;import org.junit.Test;import com.erggroup.buildtool.ripple.BuildTestResults;import com.erggroup.buildtool.ripple.ReportingData;public class BuildTestResultsTest{Logger mLogger = LoggerFactory.getLogger(BuildTestResultsTest.class);ReportingData mReporting = new ReportingData();BuildTestResults btr;@BeforeClasspublic static void setUpBeforeClass() throws Exception{}@AfterClasspublic static void tearDownAfterClass() throws Exception{}@Beforepublic void setUp() throws Exception{}@Afterpublic void tearDown() throws Exception{}@Testpublic void nonExistDirectory(){btr = new BuildTestResults("WillNotExist", mReporting, mLogger);assertFalse("Did not detect bad directory", btr.mResultsFound);}@Testpublic void basicTests(){mReporting.packageName = "buildTests";mReporting.packageVersion = "Test1" ;System.out.println("Working Directory = " + System.getProperty("user.dir"));btr = new BuildTestResults("work", mReporting, mLogger);assertTrue("Did not find files in directory", btr.mResultsFound);//System.out.println("Test count:" + btr.mTestResults.size());assertTrue("Incorrect number of tests found", btr.mTestResults.size() == 8);BuildTestResults.testResultData data = btr.mTestResults.get(1);assertTrue("Bad Target", data.platform.equals("TARGET1"));assertTrue("Bad Duration", data.duration == 2000);}}