summaryrefslogtreecommitdiff
path: root/src/internal/WixBuildTools.TestSupport/FakeBuildEngine.cs
blob: 20545970eb0ccea779d657e00c1445e7b44d5f18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.

namespace WixBuildTools.TestSupport
{
    using System.Collections;
    using System.Text;
    using Microsoft.Build.Framework;

    public class FakeBuildEngine : IBuildEngine
    {
        private readonly StringBuilder output = new StringBuilder();

        public int ColumnNumberOfTaskNode => 0;

        public bool ContinueOnError => false;

        public int LineNumberOfTaskNode => 0;

        public string ProjectFileOfTaskNode => "fake_wix.targets";

        public string Output => this.output.ToString();

        public bool BuildProjectFile(string projectFileName, string[] targetNames, IDictionary globalProperties, IDictionary targetOutputs) => throw new System.NotImplementedException();

        public void LogCustomEvent(CustomBuildEventArgs e) => this.output.AppendLine(e.Message);

        public void LogErrorEvent(BuildErrorEventArgs e) => this.output.AppendLine(e.Message);

        public void LogMessageEvent(BuildMessageEventArgs e) => this.output.AppendLine(e.Message);

        public void LogWarningEvent(BuildWarningEventArgs e) => this.output.AppendLine(e.Message);
    }
}