Exemplo n.º 1
0
        public void ExitCodeIsZeroWithCheckAndNoFilesFormatted()
        {
            var formatResult = new WorkspaceFormatResult(filesFormatted: 0, fileCount: 0, exitCode: 42);
            var exitCode     = FormatCommandCommon.GetExitCode(formatResult, check: true);

            Assert.Equal(0, exitCode);
        }
Exemplo n.º 2
0
        public void ExitCodeIsSameWithoutCheck()
        {
            var formatResult = new WorkspaceFormatResult(filesFormatted: 0, fileCount: 0, exitCode: 42);
            var exitCode     = FormatCommandCommon.GetExitCode(formatResult, check: false);

            Assert.Equal(formatResult.ExitCode, exitCode);
        }
Exemplo n.º 3
0
        public void ExitCodeIsOneWithCheckAndAnyFilesFormatted()
        {
            var formatResult = new WorkspaceFormatResult(filesFormatted: 1, fileCount: 0, exitCode: 0);
            var exitCode     = FormatCommandCommon.GetExitCode(formatResult, check: true);

            Assert.Equal(FormatCommandCommon.CheckFailedExitCode, exitCode);
        }