Exemple #1
0
            public void WhenRootNameIsIncorrect_ThenThrowException()
            {
                var xml = @"<?xml version=""1.0"" encoding=""utf-8""?>" + Environment.NewLine +
                          @"<AppRoot></AppRoot>";

                var xDoc = XDocument.Parse(xml);

                var ex = Assert.Throws <InvalidNuspecManifestException>(() => _ = new NuspecManifest(xDoc));

                Assert.That(ex.Message, Is.EqualTo("Nuspec manifest is missing root element: 'package'."));
            }
Exemple #2
0
 private static NuspecManifest CreateSut(string filePath)
 {
     return(NuspecManifest.Load(filePath));
 }
Exemple #3
0
 public void WhenPathIsNull_ThenThrowException()
 {
     Assert.Throws <ArgumentNullException>(() => NuspecManifest.Load(null));
 }
Exemple #4
0
 public void WhenIsNull_ThenThrowException()
 {
     Assert.Throws <ArgumentNullException>(() => _ = new NuspecManifest(null));
 }