diff --git a/TestCentre/PropertyTests.fs b/TestCentre/PropertyTests.fs index 68d2fe1..8f9edec 100644 --- a/TestCentre/PropertyTests.fs +++ b/TestCentre/PropertyTests.fs @@ -33,7 +33,7 @@ [] let ``RequestAllTemplateFiles does not return an empty list`` () = let test () = - Pancake.RequestAllTemplateFilesAsync () + Pancake.RequestAllTemplateFiles () |> Async.RunSynchronously let results () = Assert.NotEmpty (test()) Check.Quick (results()) diff --git a/TestCentre/UnitTests.fs b/TestCentre/UnitTests.fs index 6892ef5..a206f93 100644 --- a/TestCentre/UnitTests.fs +++ b/TestCentre/UnitTests.fs @@ -49,7 +49,7 @@ [] let ``RequestAllTemplateFiles does not generate a null`` () = - let result = Pancake.RequestAllTemplateFilesAsync () + let result = Pancake.RequestAllTemplateFiles () Assert.NotNull result [] @@ -142,7 +142,7 @@ [] let ``RequestAllTemplateFiles does not return an empty list`` () = let result = - Pancake.RequestAllTemplateFilesAsync () + Pancake.RequestAllTemplateFiles () |> Async.RunSynchronously Assert.NotEmpty result diff --git a/WetPancake/ProductServices.fs b/WetPancake/ProductServices.fs index 88d0489..0177fc9 100644 --- a/WetPancake/ProductServices.fs +++ b/WetPancake/ProductServices.fs @@ -189,13 +189,9 @@ module Pancake = /// You can use the information provided by this function alongside the "RequestTextFromFileAsync” function. /// This allows you to generate text using one of the built-in template (.txt) files. /// - let RequestAllTemplateFilesAsync () = - async { - let files = - ListSampleFiles - |> Array.toList - return files - } + let RequestAllTemplateFiles () = + ListSampleFiles + |> Array.toList /// /// An asynchronous function which generates random text. diff --git a/WetPancakeCLI/ConsoleCommands.cs b/WetPancakeCLI/ConsoleCommands.cs index c4ff7ec..6351cfb 100644 --- a/WetPancakeCLI/ConsoleCommands.cs +++ b/WetPancakeCLI/ConsoleCommands.cs @@ -56,16 +56,16 @@ namespace WetPancakeCLI if (string.IsNullOrWhiteSpace(filePath)) { var desktopDirectory = GetFolderPath(SpecialFolder.Desktop); - var savePath = $"{desktopDirectory}\\wet-pankcake-cheatsheet.pdf"; + var savePath = $"{desktopDirectory}\\wet-pancake-quick-guide.pdf"; File.Copy(cheatsheetPath, savePath, true); return "Quick Guide written to desktop."; } else { - var customSavePath = $"{filePath}\\wet-pankcake-cheatsheet.pdf"; + var customSavePath = $"{filePath}\\wet-pancake-quick-guide.pdf"; File.Copy(cheatsheetPath, customSavePath, true); if (!Directory.Exists(filePath)) throw new DirectoryNotFoundException(); - return $"Quick Guide added to {filePath}"; + return $"Quick Guide written to {filePath}"; } } @@ -116,10 +116,7 @@ namespace WetPancakeCLI try { WriteLine("Attempting to list out the available template files..."); - var files = - FSharpAsync.StartAsTask - (RequestAllTemplateFilesAsync(), _taskCreationOptions, _cancellationToken).Result; - foreach (var item in files) + foreach (var item in RequestAllTemplateFiles()) { WriteLine($"File path: {item}"); } diff --git a/WetPancakeCLI/ProductInfo/quick-guide.pdf b/WetPancakeCLI/ProductInfo/quick-guide.pdf index 8f89518..2b4a6c2 100644 Binary files a/WetPancakeCLI/ProductInfo/quick-guide.pdf and b/WetPancakeCLI/ProductInfo/quick-guide.pdf differ