/*
 * Copyright (C) 2012 Red Hat, Inc. (jcasey@redhat.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.commonjava.maven.ext.core.util;

import org.commonjava.maven.atlas.ident.ref.ArtifactRef;
import org.commonjava.maven.ext.common.model.Project;
import org.commonjava.maven.ext.core.ManipulationSession;
import org.commonjava.maven.ext.core.fixture.TestUtils;
import org.commonjava.maven.ext.core.impl.RESTCollector;
import org.commonjava.maven.ext.io.PomIO;
import org.junit.Test;

import java.io.File;
import java.util.List;
import java.util.Set;

import static org.junit.Assert.assertEquals;

public class ResolveArtifactTest
{
    @Test
    public void testResolveArtifacts() throws Exception
    {
        final ManipulationSession session = new ManipulationSession();

        // Locate the PME project pom file.
        final File projectroot = new File (TestUtils.resolveFileResource( "properties/", "" )
                                          .getParentFile()
                                          .getParentFile()
                                          .getParentFile()
                                          .getParentFile(), "pom.xml" );
        PomIO pomIO = new PomIO();
        List<Project> projects = pomIO.parseProject( projectroot );

        Set<ArtifactRef> artifacts = RESTCollector.establishAllDependencies( session, projects, null );
        System.out.println ("### artifact count is " + artifacts.size());
        assertEquals( 66, artifacts.size() );
    }
}

@@ -1159,16 +1159,80 @@
 tTest%0A%7B%0A
+    private static final String RESOURCE_BASE = %22properties/%22;%0A%0A
     @Tes
@@ -1233,16 +1233,16 @@
   @Test%0A
-
     publ
@@ -1371,52 +1371,8 @@
 );%0A%0A
-        // Locate the PME project pom file.%0A
     
@@ -1404,18 +1404,8 @@
 t = 
-new File (
 Test
@@ -1435,273 +1435,54 @@
 ce( 
-%22properties/%22, %22%22 )%0A                                          .getParentFile()%0A                                          .getParentFile()%0A                                          .getParentFile()%0A                                          .getParentFile(), %22pom.xml
+RESOURCE_BASE, %22infinispan-bom-8.2.0.Final.pom
 %22 );
@@ -1787,17 +1787,17 @@
 quals( 6
-6
+7
 , artifa

Use static file resource in ResolveArtifactTest.testResolveArtifacts