forked from forge/core
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test updates for fixed dependency equality
- Loading branch information
1 parent
31d301f
commit 5381f5c
Showing
5 changed files
with
79 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
shell-api/src/test/java/org/jboss/forge/project/dependencies/DependencyImplTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package org.jboss.forge.project.dependencies; | ||
|
||
import junit.framework.Assert; | ||
|
||
import org.jboss.forge.project.packaging.PackagingType; | ||
import org.junit.Test; | ||
|
||
public class DependencyImplTest | ||
{ | ||
|
||
@Test | ||
public void testEqualityEmpty() | ||
{ | ||
DependencyImpl left = new DependencyImpl(); | ||
DependencyImpl right = new DependencyImpl(); | ||
|
||
Assert.assertEquals(left, right); | ||
} | ||
|
||
@Test | ||
public void testEquality() | ||
{ | ||
DependencyImpl left = new DependencyImpl(); | ||
left.setArtifactId("org.test.dep"); | ||
left.setGroupId("org.test"); | ||
|
||
DependencyImpl right = new DependencyImpl(); | ||
right.setArtifactId("org.test.dep"); | ||
right.setGroupId("org.test"); | ||
|
||
Assert.assertEquals(left, right); | ||
} | ||
|
||
@Test | ||
public void testEquality2() | ||
{ | ||
DependencyImpl left = new DependencyImpl(); | ||
left.setArtifactId("weld-api-bom"); | ||
left.setGroupId("org.jboss.weld"); | ||
left.setPackagingType(PackagingType.BASIC); | ||
left.setScopeType(ScopeType.IMPORT); | ||
left.setVersion("1.1.Final"); | ||
|
||
DependencyImpl right = new DependencyImpl(); | ||
right.setArtifactId("weld-api-bom"); | ||
right.setGroupId("org.jboss.weld"); | ||
right.setPackagingType(PackagingType.BASIC); | ||
right.setScopeType(ScopeType.IMPORT); | ||
right.setVersion("1.1.Final"); | ||
|
||
Assert.assertEquals(left, right); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters