Skip to content

Commit

Permalink
[JENKINS-70464] Improve test coverage `AddEmbeddableBadgeConfigStepTe…
Browse files Browse the repository at this point in the history
…st.java` (#244)

* added 'AddEmbeddableBadgeConfigStepTest' for test coverage increase

* removed unused packages

* mvn spotless:apply applied
  • Loading branch information
abhishekmaity authored Oct 2, 2023
1 parent d111338 commit a64af16
Showing 1 changed file with 28 additions and 0 deletions.
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()));
}
}

0 comments on commit a64af16

Please sign in to comment.