test: added test descriptions and resources for manually testing different project setup methods
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
|
||||
MY_PATH=`dirname "$0"`
|
||||
|
||||
SRC_PATH=$MY_PATH/data
|
||||
WORKING_COPY_PATH=$MY_PATH/working_copy
|
||||
|
||||
mkdir -p $WORKING_COPY_PATH
|
||||
|
||||
cp -ar $SRC_PATH/. $WORKING_COPY_PATH
|
||||
|
||||
echo "Setup Complete"
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
MY_PATH=`dirname "$0"`
|
||||
|
||||
WORKING_COPY_PATH=$MY_PATH/working_copy
|
||||
|
||||
echo "" >> $WORKING_COPY_PATH/my-app/src/main/java/com/mycompany/app/Bar.java
|
||||
|
||||
echo "Update Complete"
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
MY_PATH=`dirname "$0"`
|
||||
|
||||
WORKING_COPY_PATH=$MY_PATH/working_copy
|
||||
|
||||
rm -rf $WORKING_COPY_PATH
|
||||
|
||||
echo "Teardown Complete"
|
||||
@@ -0,0 +1,39 @@
|
||||
* Run "1_setup.sh"
|
||||
* Start up Sourcetrail
|
||||
* Click "New Project"
|
||||
* Enter a project name
|
||||
* Set "./working_copy" as project location
|
||||
* Click "Add Source Group"
|
||||
* Select "Java" -> Java Source Group from Maven"
|
||||
* Click "Next"
|
||||
* Select "./working_copy/my-app/pom.xml" at "Maven Project File"
|
||||
* Click "show source files"
|
||||
* Validate 4 files are listed
|
||||
* Click "OK"
|
||||
* Check "Sould Index Tests"
|
||||
* Click "show source files"
|
||||
* Validate 5 files are listed
|
||||
* Click "OK"
|
||||
* Click "Next"
|
||||
* Add "**/Foo.java" to "Excluded Files & Directories"
|
||||
* Click "Next"
|
||||
* Click "Create"
|
||||
* Validate "All files" is the only option selectable
|
||||
* Validate 4 files are listed for indexing
|
||||
* Click "Start"
|
||||
* Validate Project indexed without error
|
||||
* Click "OK"
|
||||
* Press "Refresh" button
|
||||
* Validate "Updated files" is selected
|
||||
* Validate "source files to index" shows "0"
|
||||
* Click "Cancel"
|
||||
* Run "2_update.sh"
|
||||
* Press "Refresh" button
|
||||
* Validate "Files to clear" shows "1"
|
||||
* Validate "source files to index" shows "1"
|
||||
* Click "Start"
|
||||
* Validate Project indexed without error
|
||||
* Click "OK"
|
||||
* Close Sourcetrail
|
||||
* Run "3_teardown.sh"
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.mycompany.app</groupId>
|
||||
<artifactId>my-app</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<name>my-app</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.mycompany.app;
|
||||
|
||||
class Bar implements FooBar
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.mycompany.app;
|
||||
|
||||
class Foo implements FooBar
|
||||
{
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package com.mycompany.app;
|
||||
|
||||
public interface FooBar
|
||||
{
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package com.mycompany.app;
|
||||
|
||||
public class Main
|
||||
{
|
||||
public Foo m_foo;
|
||||
public Bar m_bar;
|
||||
|
||||
public static void main( String[] args )
|
||||
{
|
||||
System.out.println( "Hello World!" );
|
||||
}
|
||||
}
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.mycompany.app;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* Unit test for simple App.
|
||||
*/
|
||||
public class AppTest
|
||||
extends TestCase
|
||||
{
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public AppTest( String testName )
|
||||
{
|
||||
super( testName );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite()
|
||||
{
|
||||
return new TestSuite( AppTest.class );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rigourous Test :-)
|
||||
*/
|
||||
public void testApp()
|
||||
{
|
||||
assertTrue( true );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user