github.com/jaylevin/jenkins-library@v1.230.4/template/StepTestTemplateTest.groovy (about)

     1  import com.lesfurets.jenkins.unit.BasePipelineTest
     2  
     3  import static org.junit.Assert.assertEquals
     4  import static org.junit.Assert.assertTrue
     5  import org.junit.Before
     6  import org.junit.Rule
     7  import org.junit.Test
     8  import org.junit.rules.RuleChain
     9  
    10  import util.Rules
    11  import util.JenkinsStepRule
    12  
    13  class StepTestTemplateTest extends BasePipelineTest {
    14      private JenkinsStepRule jsr = new JenkinsStepRule(this)
    15  
    16      @Rule
    17      public RuleChain rules = Rules
    18          .getCommonRules(this)
    19          .around(jsr)
    20  
    21      @Before
    22      void init() throws Exception {
    23      }
    24  
    25      @Test
    26      void testStepTestTemplate() throws Exception {
    27          jsr.step.stepTestTemplate()
    28          // asserts
    29          assertTrue(true)
    30          assertJobStatusSuccess()
    31      }
    32  }