-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JENKINS-70464] Improve test coverage `AddEmbeddableBadgeConfigStepTe…
…st.java` (#244) * added 'AddEmbeddableBadgeConfigStepTest' for test coverage increase * removed unused packages * mvn spotless:apply applied
- Loading branch information
1 parent
d111338
commit a64af16
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/test/java/org/jenkinsci/plugins/badge/dsl/AddEmbeddableBadgeConfigStepTest.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,28 @@ | ||
package org.jenkinsci.plugins.badge.dsl; | ||
|
||
import static org.hamcrest.MatcherAssert.assertThat; | ||
import static org.hamcrest.core.Is.is; | ||
import static org.hamcrest.core.IsNull.nullValue; | ||
|
||
import org.junit.Test; | ||
|
||
public class AddEmbeddableBadgeConfigStepTest { | ||
@Test | ||
public void testConstructor() { | ||
AddEmbeddableBadgeConfigStep addEmbeddableBadgeConfigStep = | ||
new AddEmbeddableBadgeConfigStep("test-Id-constructor"); | ||
assertThat(addEmbeddableBadgeConfigStep.getID(), is("test-Id-constructor")); | ||
assertThat(addEmbeddableBadgeConfigStep.getSubject(), is(nullValue())); | ||
assertThat(addEmbeddableBadgeConfigStep.getStatus(), is(nullValue())); | ||
assertThat(addEmbeddableBadgeConfigStep.getColor(), is(nullValue())); | ||
assertThat(addEmbeddableBadgeConfigStep.getAnimatedOverlayColor(), is(nullValue())); | ||
assertThat(addEmbeddableBadgeConfigStep.getLink(), is(nullValue())); | ||
} | ||
|
||
@Test | ||
public void testGetAnimatedOverlayColor() { | ||
AddEmbeddableBadgeConfigStep addEmbeddableBadgeConfigStep = | ||
new AddEmbeddableBadgeConfigStep("test-animated-overlay-color"); | ||
assertThat(addEmbeddableBadgeConfigStep.getColor(), is(nullValue())); | ||
} | ||
} |