public void InitFileUnderToolsGenerateNoIssues() { // Arrange var package = PackageUtility.CreatePackage("A", "1.0", tools: new[] { "init.ps1", "install.ps1", "uninstall.ps1" }); // Act var issues = new InitScriptNotUnderToolsRule().Validate(package); // Assert Assert.False(issues.Any()); }
public void InitFileNotUnderToolsGenerateIssues() { // Arrange var package = PackageUtility.CreatePackage( "A", "1.0", tools: new[] { "net40\\init.ps1", "sl3\\init.ps1", "uninstall.ps1", "init.ps1", "winrt45\\install.ps1" }); // Act var issues = new InitScriptNotUnderToolsRule().Validate(package).ToList(); // Assert Assert.Equal(2, issues.Count); AssertIssue(issues[0], "tools\\net40\\init.ps1"); AssertIssue(issues[1], "tools\\sl3\\init.ps1"); }