Package org.gradle.shared

Source Code of org.gradle.shared.PersonTest

package org.gradle.shared;

import junit.framework.TestCase;

import java.io.IOException;
import java.util.Properties;

import edu.avans.aei.ivh5.rschelli.persistency.person.Person;

public class PersonTest extends TestCase {
    public void testTest() {
        Person person = new Person("testname1");
        assertEquals("testname1", person.getName());
        person.setName("testname2");
        assertEquals("testname2", person.getName());
    }

    public void testMainProperty() throws IOException {
        assertEquals("mainValue", new Person("test").readProperty());
    }

    public void testTestProperty() throws IOException {
        Properties properties = new Properties();
        properties.load(getClass().getClassLoader().getResourceAsStream("org/gradle/shared/test.properties"));
        assertEquals("testValue", properties.getProperty("test"));
    }
}
TOP

Related Classes of org.gradle.shared.PersonTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.