All Downloads are FREE. Search and download functionalities are using the official Maven repository.

withIntegrationTests.src.integration-test.java.org.gradle.PersonIntegrationTest Maven / Gradle / Ivy

There is a newer version: 8.11.1
Show newest version
package org.gradle;

import org.junit.Test;
import java.io.File;
import java.util.List;
import java.util.Properties;
import static org.junit.Assert.*;
import org.apache.commons.collections.list.GrowthList;

public class PersonIntegrationTest {
    @Test
    public void canConstructAPersonWithAName() {
        // check our classpath
        List list = new GrowthList();

        // check Jar exists
        File jarFile = new File(System.getProperty("jar.path"));
        assertTrue(jarFile.isFile());

        Person person = PersonTestFixture.create("Larry");
        assertEquals("Larry", person.getName());
    }
    
    @Test
    public void resourcesAreAvailableInClasspath() throws Exception {
        Properties properties = new Properties();
        properties.load(getClass().getResourceAsStream("inttest.properties"));
        assertEquals("value", properties.getProperty("int.test.prop"));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy