// Path: src/test/java/com/redhat/rcm/version/testutil/TestProjectFixture.java
// public static File getResourceFile( final String path )
// {
//     final URL resource = Thread.currentThread()
//                                .getContextClassLoader()
//                                .getResource( path );
//     if ( resource == null )
//     {
//         fail( "Resource not found: " + path );
//     }
// 
//     return new File( resource.getPath() );
// }
// 
// Path: src/test/java/com/redhat/rcm/version/testutil/TestProjectFixture.java
// public static Model loadModel( final String path )
//     throws IOException
// {
//     final File pom = getResourceFile( path );
//     return loadModel( pom );
// }
// 
// Path: src/test/java/com/redhat/rcm/version/testutil/TestProjectFixture.java
// public static VersionManagerSession newVersionManagerSession( final File workspace, final File reports, final String suffix, final String modifier )
// {
//     return new SessionBuilder( workspace, reports ).withVersionSuffix( suffix )
//                                                    .withVersionModifier( modifier )
//                                                    .build();
// }


import static com.redhat.rcm.version.testutil.TestProjectFixture.getResourceFile;
import static com.redhat.rcm.version.testutil.TestProjectFixture.loadModel;
import static com.redhat.rcm.version.testutil.TestProjectFixture.newVersionManagerSession;
import static org.apache.commons.io.FileUtils.readFileToString;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.junit.Assert.assertThat;
import org.apache.maven.mae.project.key.FullProjectKey;
import org.apache.maven.model.Model;
import org.apache.maven.model.Plugin;
import org.codehaus.plexus.util.FileUtils;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
import com.redhat.rcm.version.fixture.LoggingFixture;
import com.redhat.rcm.version.mgr.AbstractVersionManagerTest;
import com.redhat.rcm.version.mgr.session.VersionManagerSession;
import java.io.File;
import java.util.List;
/*
 *  Copyright (C) 2011 John Casey.
 *  
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Affero General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *  
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Affero General Public License for more details.
 *  
 *  You should have received a copy of the GNU Affero General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.redhat.rcm.version.util;





public class PomUtilsTest
    extends AbstractVersionManagerTest
{
    private static final String BASE = "pom-formats/";

    @Rule
    public final TestName name = new TestName();

    @Test
    public void pomRewritePreservesXMLAttributesInPluginConfiguration()
        throws Exception
    {
// Path: src/test/java/com/redhat/rcm/version/testutil/TestProjectFixture.java
// public static File getResourceFile( final String path )
// {
//     final URL resource = Thread.currentThread()
//                                .getContextClassLoader()
//                                .getResource( path );
//     if ( resource == null )
//     {
//         fail( "Resource not found: " + path );
//     }
// 
//     return new File( resource.getPath() );
// }
// 
// Path: src/test/java/com/redhat/rcm/version/testutil/TestProjectFixture.java
// public static Model loadModel( final String path )
//     throws IOException
// {
//     final File pom = getResourceFile( path );
//     return loadModel( pom );
// }
// 
// Path: src/test/java/com/redhat/rcm/version/testutil/TestProjectFixture.java
// public static VersionManagerSession newVersionManagerSession( final File workspace, final File reports, final String suffix, final String modifier )
// {
//     return new SessionBuilder( workspace, reports ).withVersionSuffix( suffix )
//                                                    .withVersionModifier( modifier )
//                                                    .build();
// }


// Path: src/test/java/com/redhat/rcm/version/util/PomUtilsTest.java
import static com.redhat.rcm.version.testutil.TestProjectFixture.getResourceFile;
import static com.redhat.rcm.version.testutil.TestProjectFixture.loadModel;
import static com.redhat.rcm.version.testutil.TestProjectFixture.newVersionManagerSession;
import static org.apache.commons.io.FileUtils.readFileToString;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.junit.Assert.assertThat;
import org.apache.maven.mae.project.key.FullProjectKey;
import org.apache.maven.model.Model;
import org.apache.maven.model.Plugin;
import org.codehaus.plexus.util.FileUtils;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
import com.redhat.rcm.version.fixture.LoggingFixture;
import com.redhat.rcm.version.mgr.AbstractVersionManagerTest;
import com.redhat.rcm.version.mgr.session.VersionManagerSession;
import java.io.File;
import java.util.List;

/*
 *  Copyright (C) 2011 John Casey.
 *  
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Affero General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *  
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Affero General Public License for more details.
 *  
 *  You should have received a copy of the GNU Affero General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.redhat.rcm.version.util;





public class PomUtilsTest
    extends AbstractVersionManagerTest
{
    private static final String BASE = "pom-formats/";

    @Rule
    public final TestName name = new TestName();

    @Test
    public void pomRewritePreservesXMLAttributesInPluginConfiguration()
        throws Exception
    {
        final File srcPom = getResourceFile( BASE + "plugin-config-attributes.pom" );