private void TestResolveHelper(string itemSpec, string projectGuid, string package, string name,
            Hashtable pregenConfigurations, bool expectedResult,
            string expectedFullConfiguration, string expectedConfiguration, string expectedPlatform)
        {
            ITaskItem reference = ResolveNonMSBuildProjectOutput_Tests.CreateReferenceItem(itemSpec, projectGuid, package, name);
            // Use the XML string generation method from our sister class - XML element names will be different,
            // but they are ignored anyway, and the rest is identical
            string xmlString = ResolveNonMSBuildProjectOutput_Tests.CreatePregeneratedPathDoc(pregenConfigurations);
            ITaskItem resolvedProjectWithConfiguration;

            AssignProjectConfiguration rpc = new AssignProjectConfiguration();
            rpc.SolutionConfigurationContents = xmlString;
            rpc.CacheProjectElementsFromXml(xmlString);
            bool result = rpc.ResolveProject(reference, out resolvedProjectWithConfiguration);

            string message = string.Format("Reference \"{0}\" [project \"{1}\", package \"{2}\", name \"{3}\"] Pregen Xml string : \"{4}\"" +
                "expected result \"{5}\", actual result \"{6}\", expected configuration \"{7}\", actual configuration \"{8}\".",
                itemSpec, projectGuid, package, name, xmlString, expectedResult, result, expectedFullConfiguration,
                (resolvedProjectWithConfiguration == null) ? string.Empty : resolvedProjectWithConfiguration.GetMetadata("FullConfiguration"));

            Assert.AreEqual(expectedResult, result, message);
            if (result == true)
            {
                Assert.AreEqual(expectedFullConfiguration, resolvedProjectWithConfiguration.GetMetadata("FullConfiguration"));
                Assert.AreEqual(expectedConfiguration, resolvedProjectWithConfiguration.GetMetadata("Configuration"));
                Assert.AreEqual(expectedPlatform, resolvedProjectWithConfiguration.GetMetadata("Platform"));
                Assert.AreEqual("Configuration=" + expectedConfiguration, resolvedProjectWithConfiguration.GetMetadata("SetConfiguration"));
                Assert.AreEqual("Platform=" + expectedPlatform, resolvedProjectWithConfiguration.GetMetadata("SetPlatform"));
                Assert.AreEqual(reference.ItemSpec, resolvedProjectWithConfiguration.ItemSpec);
            }
            else
            {
                Assert.AreEqual(null, resolvedProjectWithConfiguration);
            }
        }