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'.")); }
private static NuspecManifest CreateSut(string filePath) { return(NuspecManifest.Load(filePath)); }
public void WhenPathIsNull_ThenThrowException() { Assert.Throws <ArgumentNullException>(() => NuspecManifest.Load(null)); }
public void WhenIsNull_ThenThrowException() { Assert.Throws <ArgumentNullException>(() => _ = new NuspecManifest(null)); }