public void PackageConfigTestLine() { var packageUpdater = new PackageUpdater(new FileInterface()); string line = @"<package id=""NLog"" version=""4.5.3"" targetFramework=""net461"" />"; string result = packageUpdater.ProcessLine(line, "NLog", "9.9.9"); result.Should().Be(@"<package id=""NLog"" version=""9.9.9"" targetFramework=""net461"" />"); }
public void PackageConfigTestLine_MissingVersion() { var packageUpdater = new PackageUpdater(new FileInterface()); string line = @"<package id=""NLog"" targetFramework=""net461"" />"; Action act = () => { packageUpdater.ProcessLine(line, "NLog", "9.9.9"); }; act.Should().Throw <Exception>() .WithMessage("versionEquals not found"); }