Example #1
0
        public static FakeCakeContext CreateFakeContext(string workingDirectory = "./test-file-system")
        {
            var cakeCtx    = new FakeCakeContext();
            var testFSPath = new DirectoryPath(workingDirectory);
            var testFSDir  = cakeCtx.Context.FileSystem.GetDirectory(testFSPath);

            if (testFSDir.Exists)
            {
                testFSDir.Delete(true);
            }

            testFSDir.Create();

            return(cakeCtx);
        }
Example #2
0
 public TasksReuseAliasTests()
 {
     Cake = FakeCakeContext.CreateFakeContext();
 }