public void RemoveCmdlet()
        {
            cmdletBreakingChangeAnalyzer.Analyze(
                new List <string> {
                _testCmdletDirPath
            },
                ((dirList) => { return(new List <string> {
                    _testCmdletDirPath
                }); }),
                (cmdletName) => cmdletName.Equals("Test-RemoveCmdlet", StringComparison.OrdinalIgnoreCase));

            AnalysisReport testReport = cmdletBreakingChangeAnalyzer.GetAnalysisReport();

            string output = "Test-RemoveCmdlet\nProblemId Count: " + testReport.ProblemIdList.Count;

            foreach (var problemId in testReport.ProblemIdList)
            {
                output += "\nProblemId: " + problemId;
            }

            xunitOutput.WriteLine(output);

            Assert.Equal(1, testReport.ProblemIdList.Count);
            Assert.True(testReport.ProblemIdList.Where <int>((problemId) => problemId.Equals(BreakingChangeProblemId.RemovedCmdlet)).SingleOrDefault <int>().Equals(BreakingChangeProblemId.RemovedCmdlet));
        }
Пример #2
0
        public void RemoveCmdlet()
        {
            cmdletBreakingChangeAnalyzer.Analyze(
                new List <string> {
                _testCmdletDirPath
            },
                ((dirList) => { return(new List <string> {
                    _testCmdletDirPath
                }); }),
                (cmdletName) => cmdletName.Equals("Test-RemoveCmdlet", StringComparison.OrdinalIgnoreCase));

            AnalysisReport testReport = cmdletBreakingChangeAnalyzer.GetAnalysisReport();

            Assert.Equal(1, testReport.ProblemIdList.Count);
            Assert.True(testReport.ProblemIdList.Where <int>((problemId) => problemId.Equals(BreakingChangeProblemId.RemovedCmdlet)).SingleOrDefault <int>().Equals(BreakingChangeProblemId.RemovedCmdlet));
        }