Last active
July 31, 2018 19:35
-
-
Save thorntonrose/1061eedaa5f0a9a1e1959e1f0cf224c6 to your computer and use it in GitHub Desktop.
Jenkins Lib Testing - ToAlphanumericTest.groovy
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
import org.junit.* | |
import com.lesfurets.jenkins.unit.* | |
import static groovy.test.GroovyAssert.* | |
class ToAlphanumericTest extends BasePipelineTest { | |
def toAlphanumeric | |
@Before | |
void setUp() { | |
super.setUp() | |
// load toAlphanumeric | |
toAlphanumeric = loadScript("vars/toAlphanumeric.groovy") | |
} | |
@Test | |
void testCall() { | |
// call toAlphanumeric and check result | |
def result = toAlphanumeric(text: "a_B-c.1") | |
assertEquals "result:", "abc1", result | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment