quickstart.src.test.groovy.org.gradle.PersonTest.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-api Show documentation
Show all versions of gradle-api Show documentation
Gradle 6.9.1 API redistribution.
package org.gradle
import org.junit.Test
import static org.junit.Assert.assertEquals
import static org.junit.Assert.assertNotNull
class PersonTest {
@Test public void canConstructAPerson() {
Person p = new Person()
assertEquals('Barry', p.name)
}
@Test public void canConstructAPersonUsingName() {
Person p = new Person(name: 'name')
assertEquals('name', p.name)
}
@Test public void usingCorrectVersionOfGroovy() {
assertEquals('2.4.10', GroovySystem.version)
}
@Test public void testResourcesAreAvailable() {
assertNotNull(getClass().getResource('/testResource.txt'))
assertNotNull(getClass().getResource('/testScript.groovy'))
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy