Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a test-jar in order to use this project directly in another project #3

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
DTO Tester, as explained in the Blog Post "[Automatically JUnit Test DTO and Transfer Objects](https://objectpartners.com/2016/02/16/automatically-junit-test-dto-and-transfer-objects/)"


To use it as a maven dependency, build it and install in your local maven repository using `mvn install` and import in your project as a test-scoped dependency. E.g.:

```
<dependency>
<groupId>com.objectpartners</groupId>
<artifactId>dtotester</artifactId>
<version>0.0.2-SNAPSHOT</version>
<scope>test</scope>
</dependency>
```

To test simple DTOs, extend DtoTest<> in your test class:

```
package your.package;

import com.objectpartners.DtoTest;

public class MyOwnDtoTest extends DtoTest<MyOwnDto> {

@Override
protected MyOwnDto getInstance() {
return new MyOwnDto();
}

}
```

For more information, please read the [blog post](https://objectpartners.com/2016/02/16/automatically-junit-test-dto-and-transfer-objects/)

5 changes: 2 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

<groupId>com.objectpartners</groupId>
<artifactId>dtotester</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.0.2-SNAPSHOT</version>
<packaging>jar</packaging>

<name>dtotester</name>
<url>http://maven.apache.org</url>
<url>https://objectpartners.com/2016/02/16/automatically-junit-test-dto-and-transfer-objects/</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -39,7 +39,6 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
169 changes: 0 additions & 169 deletions src/main/java/com/objectpartners/EverythingTransfer.java

This file was deleted.

Loading