Skip to content

Commit

Permalink
Merge pull request #14 from jonesbusy/feature/bom-tests
Browse files Browse the repository at this point in the history
Add smoke tests
  • Loading branch information
jonesbusy authored Feb 8, 2024
2 parents ebb8e04 + 06f6f89 commit 5abe3a8
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/test/java/io/jenkins/plugins/SmokeTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package io.jenkins.plugins;

import static org.junit.Assert.assertEquals;

import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.junit.jupiter.api.Test;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.junit.jupiter.WithJenkins;

@WithJenkins
class SmokeTest {
@Test
void smokeTest(JenkinsRule jenkinsRule) throws Exception {
DateTime dateTime = new DateTime(2022, 1, 1, 0, 0, DateTimeZone.UTC);
DateTime modifiedDateTime = dateTime.plusDays(1);

assertEquals(2022, dateTime.getYear());
assertEquals(1, dateTime.getMonthOfYear());
assertEquals(1, dateTime.getDayOfMonth());

assertEquals(2022, modifiedDateTime.getYear());
assertEquals(1, modifiedDateTime.getMonthOfYear());
assertEquals(2, modifiedDateTime.getDayOfMonth());
}
}

0 comments on commit 5abe3a8

Please sign in to comment.