Package org.springframework.roo.classpath.details

Source Code of org.springframework.roo.classpath.details.ItdTypeDetailsTestCase

package org.springframework.roo.classpath.details;

import static org.junit.Assert.assertEquals;

import org.springframework.roo.classpath.itd.ItdSourceFileComposer;

/**
* Superclass for testing {@link ItdTypeDetails} instances and subclasses
*
* @author Andrew Swan
* @since 1.2.0
*/
public abstract class ItdTypeDetailsTestCase {

    /**
     * Asserts that the given ITD produces the given output
     *
     * @param expectedOutput the ITD's expected output
     * @param itd the ITD to check (required)
     */
    protected void assertOutput(final String expectedOutput,
            final ItdTypeDetails itd) {
        // Set up
        final ItdSourceFileComposer composer = new ItdSourceFileComposer(itd);

        // Invoke
        final String actualOutput = composer.getOutput();

        // Check
        assertEquals(expectedOutput, actualOutput);
    }
}
TOP

Related Classes of org.springframework.roo.classpath.details.ItdTypeDetailsTestCase

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.