Пример #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'."));
            }
Пример #2
0
 private static NuspecManifest CreateSut(string filePath)
 {
     return(NuspecManifest.Load(filePath));
 }
Пример #3
0
 public void WhenPathIsNull_ThenThrowException()
 {
     Assert.Throws <ArgumentNullException>(() => NuspecManifest.Load(null));
 }
Пример #4
0
 public void WhenIsNull_ThenThrowException()
 {
     Assert.Throws <ArgumentNullException>(() => _ = new NuspecManifest(null));
 }