// Path: src/test/java/com/redhat/rcm/version/testutil/TestProjectFixture.java
// public static void dumpModel( final Model model )
//     throws IOException
// {
//     final StringWriter writer = new StringWriter();
//     new MavenXpp3Writer().write( writer, model );
// 
//     System.out.println( "\n\n" + writer.toString() + "\n\n" );
// }
// 
// 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 Set<Model> loadModels( final Set<File> poms )
//     throws VManException, IOException
// {
//     final Set<Model> models = new LinkedHashSet<Model>( poms.size() );
//     for ( final File pom : poms )
//     {
//         models.add( loadModel( pom ) );
//     }
// 
//     return models;
// }
// 
// 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.dumpModel;
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.loadModels;
import static com.redhat.rcm.version.testutil.TestProjectFixture.newVersionManagerSession;
import static org.apache.commons.io.FileUtils.copyDirectory;
import static org.apache.commons.io.FileUtils.copyFile;
import static org.apache.commons.io.FileUtils.readFileToString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
import static org.junit.Assert.assertThat;
import java.io.File;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import org.apache.maven.mae.project.key.FullProjectKey;
import org.apache.maven.model.Model;
import org.apache.maven.model.Parent;
import org.apache.maven.project.MavenProject;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import com.redhat.rcm.version.fixture.LoggingFixture;
import com.redhat.rcm.version.mgr.mod.VersionSuffixModder;
import com.redhat.rcm.version.mgr.session.VersionManagerSession;
import com.redhat.rcm.version.model.Project;
/*
 * Copyright (c) 2010 Red Hat, Inc.
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU 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 General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see 
 * <http://www.gnu.org/licenses>.
 */

package com.redhat.rcm.version.mgr;





public class VersionSuffixManagementTest
    extends AbstractVersionManagerTest
{

    private static final String TEST_POMS = "suffix/";

    private static final String TOOLCHAIN_PATH = TEST_POMS + "toolchain-1.0.pom";

    private static final String SUFFIX = "-rebuild-1";

    private static final String PARENT_VERSION_BOM = TEST_POMS + "parent-version-bom.pom";

    @BeforeClass
    public static void enableLogging()
    {
        LoggingFixture.setupLogging();
    }

    @Before
    public void setup()
// Path: src/test/java/com/redhat/rcm/version/testutil/TestProjectFixture.java
// public static void dumpModel( final Model model )
//     throws IOException
// {
//     final StringWriter writer = new StringWriter();
//     new MavenXpp3Writer().write( writer, model );
// 
//     System.out.println( "\n\n" + writer.toString() + "\n\n" );
// }
// 
// 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 Set<Model> loadModels( final Set<File> poms )
//     throws VManException, IOException
// {
//     final Set<Model> models = new LinkedHashSet<Model>( poms.size() );
//     for ( final File pom : poms )
//     {
//         models.add( loadModel( pom ) );
//     }
// 
//     return models;
// }
// 
// 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/mgr/VersionSuffixManagementTest.java
import static com.redhat.rcm.version.testutil.TestProjectFixture.dumpModel;
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.loadModels;
import static com.redhat.rcm.version.testutil.TestProjectFixture.newVersionManagerSession;
import static org.apache.commons.io.FileUtils.copyDirectory;
import static org.apache.commons.io.FileUtils.copyFile;
import static org.apache.commons.io.FileUtils.readFileToString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
import static org.junit.Assert.assertThat;
import java.io.File;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import org.apache.maven.mae.project.key.FullProjectKey;
import org.apache.maven.model.Model;
import org.apache.maven.model.Parent;
import org.apache.maven.project.MavenProject;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import com.redhat.rcm.version.fixture.LoggingFixture;
import com.redhat.rcm.version.mgr.mod.VersionSuffixModder;
import com.redhat.rcm.version.mgr.session.VersionManagerSession;
import com.redhat.rcm.version.model.Project;

/*
 * Copyright (c) 2010 Red Hat, Inc.
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU 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 General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see 
 * <http://www.gnu.org/licenses>.
 */

package com.redhat.rcm.version.mgr;





public class VersionSuffixManagementTest
    extends AbstractVersionManagerTest
{

    private static final String TEST_POMS = "suffix/";

    private static final String TOOLCHAIN_PATH = TEST_POMS + "toolchain-1.0.pom";

    private static final String SUFFIX = "-rebuild-1";

    private static final String PARENT_VERSION_BOM = TEST_POMS + "parent-version-bom.pom";

    @BeforeClass
    public static void enableLogging()
    {
        LoggingFixture.setupLogging();
    }

    @Before
    public void setup()
        throws Throwable