Example #1
0
        public static void Initialize(TestContext context)
        {
            vContainer = new ContainerBuilder().UseGittyAndPegh(new DummyCsArgumentPrompter()).Build();

            ScriptsFolder = CakeScriptsFolder();
            DeleteFolder(ScriptsFolder);
            Directory.CreateDirectory(ScriptsFolder.FullName);

            var cakeScriptReader = vContainer.Resolve <IEmbeddedCakeScriptReader>();
            var errorsAndInfos   = new ErrorsAndInfos();

            foreach (var cakeId in new[] { "success", "failure", "net5" })
            {
                File.WriteAllText(ScriptsFolder.FullName + @"\" + cakeId + ".cake", cakeScriptReader.ReadCakeScriptFromAssembly(Assembly.GetExecutingAssembly(), cakeId + ".cake", errorsAndInfos));
                Assert.IsFalse(errorsAndInfos.AnyErrors(), errorsAndInfos.ErrorsToString());
            }

            Sut = vContainer.Resolve <IDotNetCakeRunner>();
        }
Example #2
0
 public CakeBuilder(IDotNetCakeRunner cakeRunner)
 {
     CakeRunner = cakeRunner;
 }
Example #3
0
 public TestTargetRunner(IDotNetCakeRunner cakeRunner, IEmbeddedCakeScriptReader embeddedCakeScriptReader)
 {
     vCakeRunner = cakeRunner;
     vEmbeddedCakeScriptReader = embeddedCakeScriptReader;
 }