From 44d8c5e702c8316e7ece94795114b12b8c22024c Mon Sep 17 00:00:00 2001 From: "OPTIMUS-PRIME\\craig" Date: Sat, 16 Jun 2018 19:07:42 +0100 Subject: [PATCH] Got Xunit running. Visual Studio runner, also, working. --- TestCentre/AssemblyInfo.fs | 41 +++++++++++++ TestCentre/PropTests.fs | 6 -- TestCentre/Script.fsx | 8 +++ TestCentre/TestCentre.fsproj | 116 +++++++++++++++++++++++++++++++---- TestCentre/UnitTests.fs | 15 ++--- TestCentre/packages.config | 12 ++++ WetPancake.sln | 10 +-- 7 files changed, 177 insertions(+), 31 deletions(-) create mode 100644 TestCentre/AssemblyInfo.fs delete mode 100644 TestCentre/PropTests.fs create mode 100644 TestCentre/Script.fsx create mode 100644 TestCentre/packages.config diff --git a/TestCentre/AssemblyInfo.fs b/TestCentre/AssemblyInfo.fs new file mode 100644 index 0000000..7eb74fa --- /dev/null +++ b/TestCentre/AssemblyInfo.fs @@ -0,0 +1,41 @@ +namespace TestCentre.AssemblyInfo + +open System.Reflection +open System.Runtime.CompilerServices +open System.Runtime.InteropServices + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[] +[] +[] +[] +[] +[] +[] +[] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [] +[] +[] + +do + () \ No newline at end of file diff --git a/TestCentre/PropTests.fs b/TestCentre/PropTests.fs deleted file mode 100644 index ca8c90c..0000000 --- a/TestCentre/PropTests.fs +++ /dev/null @@ -1,6 +0,0 @@ -module PropTests - - open FsCheck - open WetPancake.Pancake - - let RandomText = RequestRandomText() \ No newline at end of file diff --git a/TestCentre/Script.fsx b/TestCentre/Script.fsx new file mode 100644 index 0000000..1845605 --- /dev/null +++ b/TestCentre/Script.fsx @@ -0,0 +1,8 @@ +// Learn more about F# at http://fsharp.org +// See the 'F# Tutorial' project for more help. + +#load "Library1.fs" +open TestCentre + +// Define your library scripting code here + diff --git a/TestCentre/TestCentre.fsproj b/TestCentre/TestCentre.fsproj index cbf7fdc..16ff8a6 100644 --- a/TestCentre/TestCentre.fsproj +++ b/TestCentre/TestCentre.fsproj @@ -1,22 +1,112 @@ - - + + + + + - netstandard2.0 + Debug + AnyCPU + 2.0 + aa30074c-bef2-4f2b-89f4-7069179b3ab7 + Library + TestCentre + TestCentre + true + v4.7.1 + 4.4.3.0 + true + TestCentre + + - + + true + full + false + false + bin\$(Configuration)\ + DEBUG;TRACE + 3 + bin\$(Configuration)\$(AssemblyName).XML + + + pdbonly + true + true + bin\$(Configuration)\ + TRACE + 3 + bin\$(Configuration)\$(AssemblyName).XML + + + 11 + + + + + $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets + + + + - + + + - - - - + + + FSharp.Core + FSharp.Core.dll + $(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.dll + + + + + + True + + + ..\packages\xunit.abstractions.2.0.1\lib\net35\xunit.abstractions.dll + + + ..\packages\xunit.assert.2.3.1\lib\netstandard1.1\xunit.assert.dll + + + ..\packages\xunit.extensibility.core.2.3.1\lib\netstandard1.1\xunit.core.dll + + + ..\packages\xunit.extensibility.execution.2.3.1\lib\net452\xunit.execution.desktop.dll + - - + + WetPancake + {cb878c2d-edba-490b-b6b3-01b57779a28f} + True + - - + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + \ No newline at end of file diff --git a/TestCentre/UnitTests.fs b/TestCentre/UnitTests.fs index 9747c10..b10fda9 100644 --- a/TestCentre/UnitTests.fs +++ b/TestCentre/UnitTests.fs @@ -1,10 +1,11 @@ -namespace TestCentre.UnitTests +namespace TestCentre + open Xunit -open WetPancake.Pancake +open WetPancake - module UnitTests = +module UnitTests = - [] - let RandomTest1()= - let result = RequestRandomText - Assert.NotNull(result) \ No newline at end of file + [] + let ``Random Text does not generate a null string`` () = + let result = Pancake.RequestRandomText + Assert.NotNull(result) diff --git a/TestCentre/packages.config b/TestCentre/packages.config new file mode 100644 index 0000000..8a96434 --- /dev/null +++ b/TestCentre/packages.config @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/WetPancake.sln b/WetPancake.sln index c1c3ad9..105f185 100644 --- a/WetPancake.sln +++ b/WetPancake.sln @@ -7,7 +7,7 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WetPancake", "WetPancake\We EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WetPancakeCLI", "WetPancakeCLI\WetPancakeCLI.csproj", "{87C61362-58D8-4D79-ABF3-F356041F5DEC}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "TestCentre", "TestCentre\TestCentre.fsproj", "{1424BA46-9BB9-49CE-85B4-59E3208343CE}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "TestCentre", "TestCentre\TestCentre.fsproj", "{AA30074C-BEF2-4F2B-89F4-7069179B3AB7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -23,10 +23,10 @@ Global {87C61362-58D8-4D79-ABF3-F356041F5DEC}.Debug|Any CPU.Build.0 = Debug|Any CPU {87C61362-58D8-4D79-ABF3-F356041F5DEC}.Release|Any CPU.ActiveCfg = Release|Any CPU {87C61362-58D8-4D79-ABF3-F356041F5DEC}.Release|Any CPU.Build.0 = Release|Any CPU - {1424BA46-9BB9-49CE-85B4-59E3208343CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1424BA46-9BB9-49CE-85B4-59E3208343CE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1424BA46-9BB9-49CE-85B4-59E3208343CE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1424BA46-9BB9-49CE-85B4-59E3208343CE}.Release|Any CPU.Build.0 = Release|Any CPU + {AA30074C-BEF2-4F2B-89F4-7069179B3AB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AA30074C-BEF2-4F2B-89F4-7069179B3AB7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AA30074C-BEF2-4F2B-89F4-7069179B3AB7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AA30074C-BEF2-4F2B-89F4-7069179B3AB7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE