Example #1
0
        public void XmlGetElementTests_WhenValuesAreValidShouldGetXmlValueProperly()
        {
            var nuGetterActivities = new XmlGetElement();

            var elementValue = nuGetterActivities.GetXmlElementValue("TestLib.nuspec", "ns:package/ns:metadata/ns:version", "http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd", "ns");

            Assert.AreEqual("0.9.4156.32354", elementValue);
        }
        public void XmlGetElementTests_WhenValuesAreValidShouldGetXmlValueProperly()
        {
            var nuGetterActivities = new XmlGetElement();

            var elementValue = nuGetterActivities.GetXmlElementValue("TestLib.nuspec", "ns:package/ns:metadata/ns:version", "http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd", "ns");

            Assert.AreEqual("0.9.4156.32354", elementValue);
        }
Example #3
0
        public void XmlGetElementTests_WhenUsingV15NuspecFileWithNoNamespaceShouldGetValueProperly()
        {
            const string xpathExpression = "ns:package/ns:metadata/ns:version";

            var nuGetterActivities = new XmlGetElement();

            var elementValue = nuGetterActivities.GetXmlElementValue("TestLibNoNamespace.nuspec", xpathExpression, "", "");

            Assert.AreEqual("1.5.0.0", elementValue);
        }
Example #4
0
        public void XmlGetElementTests_WhenUsingV14NuspecFileCheckedShouldGetValueProperly()
        {
            const string xpathExpression = "ns:package/ns:metadata/ns:version";

            var nuGetterActivities = new XmlGetElement();

            var elementValue = nuGetterActivities.GetXmlElementValue("TestLib.nuspec", xpathExpression, "", "");

            Assert.AreEqual("0.9.4156.32354", elementValue);
        }
        public void XmlGetElementTests_WhenUsingV15NuspecFileWithNoNamespaceShouldGetValueProperly()
        {
            const string xpathExpression = "ns:package/ns:metadata/ns:version";

            var nuGetterActivities = new XmlGetElement();

            var elementValue = nuGetterActivities.GetXmlElementValue("TestLibNoNamespace.nuspec", xpathExpression, "", "");

            Assert.AreEqual("1.5.0.0", elementValue);
        }
        public void XmlGetElementTests_WhenUsingV14NuspecFileCheckedShouldGetValueProperly()
        {
            const string xpathExpression = "ns:package/ns:metadata/ns:version";

            var nuGetterActivities = new XmlGetElement();

            var elementValue = nuGetterActivities.GetXmlElementValue("TestLib.nuspec", xpathExpression, "", "");

            Assert.AreEqual("0.9.4156.32354", elementValue);
        }