Ejemplo n.º 1
0
        public void DotnetBuildDoesNotPrintCopyrightInfo()
        {
            var testInstance = _testAssetsManager.CopyTestAsset("MSBuildTestApp")
                               .WithSource()
                               .Restore(Log);

            var cmd = new DotnetBuildCommand(Log)
                      .WithWorkingDirectory(testInstance.Path)
                      .Execute("--nologo");

            cmd.Should().Pass();

            if (!TestContext.IsLocalized())
            {
                cmd.Should().NotHaveStdOutContaining("Copyright (C) Microsoft Corporation. All rights reserved.");
            }
        }
Ejemplo n.º 2
0
        public void ItPrintsBuildSummary()
        {
            var testAppName  = "MSBuildTestApp";
            var testInstance = _testAssetsManager.CopyTestAsset(testAppName)
                               .WithSource()
                               .Restore(Log);

            string expectedBuildSummary = @"Build succeeded.
    0 Warning(s)
    0 Error(s)";

            var cmd = new DotnetBuildCommand(Log)
                      .WithWorkingDirectory(testInstance.Path)
                      .Execute();

            cmd.Should().Pass();
            cmd.StdOut.Should().ContainVisuallySameFragmentIfNotLocalized(expectedBuildSummary);
        }