Permalink
Browse files

Don't reference PowerPack

  • Loading branch information...
1 parent 33a3115 commit 3ded92d1c02649bbc4aa51b67ae313ff52a1a36e @forki committed Oct 17, 2012
View
@@ -58,8 +58,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGetContent", "NuGetConten
NuGetContent\Sample.fs.pp = NuGetContent\Sample.fs.pp
EndProjectSection
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Spec.KataProbability", "src\test\Spec.KataProbability\Spec.KataProbability.fsproj", "{03DD56F1-EFB8-4EA0-A050-5989C16B6B55}"
-EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Spec.KataStringReplacer", "src\test\Spec.KataStringReplacer\Spec.KataStringReplacer.fsproj", "{615E7A26-8859-4C43-94D3-29841BF572DF}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Spec.KataSort", "src\test\Spec.KataSort\Spec.KataSort.fsproj", "{49BE2083-CA2E-4C5D-9830-F186B8DAB1A3}"
@@ -244,16 +242,6 @@ Global
{FC2D5EB6-E37F-46B7-A3E6-374CBA380153}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{FC2D5EB6-E37F-46B7-A3E6-374CBA380153}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{FC2D5EB6-E37F-46B7-A3E6-374CBA380153}.Release|x86.ActiveCfg = Release|Any CPU
- {03DD56F1-EFB8-4EA0-A050-5989C16B6B55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {03DD56F1-EFB8-4EA0-A050-5989C16B6B55}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {03DD56F1-EFB8-4EA0-A050-5989C16B6B55}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {03DD56F1-EFB8-4EA0-A050-5989C16B6B55}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {03DD56F1-EFB8-4EA0-A050-5989C16B6B55}.Debug|x86.ActiveCfg = Debug|Any CPU
- {03DD56F1-EFB8-4EA0-A050-5989C16B6B55}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {03DD56F1-EFB8-4EA0-A050-5989C16B6B55}.Release|Any CPU.Build.0 = Release|Any CPU
- {03DD56F1-EFB8-4EA0-A050-5989C16B6B55}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {03DD56F1-EFB8-4EA0-A050-5989C16B6B55}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {03DD56F1-EFB8-4EA0-A050-5989C16B6B55}.Release|x86.ActiveCfg = Release|Any CPU
{615E7A26-8859-4C43-94D3-29841BF572DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{615E7A26-8859-4C43-94D3-29841BF572DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{615E7A26-8859-4C43-94D3-29841BF572DF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -306,7 +294,6 @@ Global
{A7F81D5C-4BCA-44DD-932A-36BD88ADB19A} = {D86C8AE6-3344-4922-A742-99B707FAAEC7}
{691EB18C-A8A9-426A-BE4E-7D42D05291AE} = {D86C8AE6-3344-4922-A742-99B707FAAEC7}
{FC2D5EB6-E37F-46B7-A3E6-374CBA380153} = {D86C8AE6-3344-4922-A742-99B707FAAEC7}
- {03DD56F1-EFB8-4EA0-A050-5989C16B6B55} = {D86C8AE6-3344-4922-A742-99B707FAAEC7}
{615E7A26-8859-4C43-94D3-29841BF572DF} = {D86C8AE6-3344-4922-A742-99B707FAAEC7}
{49BE2083-CA2E-4C5D-9830-F186B8DAB1A3} = {D86C8AE6-3344-4922-A742-99B707FAAEC7}
{6B7D4C2E-73E8-4809-AD95-3DAB66221A76} = {D86C8AE6-3344-4922-A742-99B707FAAEC7}
@@ -1,21 +0,0 @@
-KataProbability
-
-Value objects are an important concept in DDD. This kata is made both to learn value objects and to learn better ways of testing.
-
-Write a probability value object. It should contain the following methods:
- Probability CombinedWith(Probability)
- Probability InverseOf()
- Probability Either(Probability)
-
-if you forget your probability math:
- Either:P(A) + P(B) - P(A)P(B)
- CombinedWith: P(A)P(B)
- InverseOf: 1 - P(A)
-
-The math is surprisingly not the main part of the exercise.
-
-The internal state should be held as a decimal. Use TDD when writing this object.
-
-One last thing. You can't put any getters on the object. What's the first test to write?
-
-When finished continue reading: https://gist.github.com/1018566
@@ -1,16 +0,0 @@
-module Probability.Model
-
-type Probability = Probability of BigRational
-
-let Certainly = Probability 1N
-let Impossible = Probability 0N
-
-let combine (Probability x) (Probability y) = Probability(x * y)
-
-let toProbability x = Probability x
-
-let inverse (Probability x) = Probability(1N - x)
-
-let either (Probability x) (Probability y) =
- x + y - x * y
- |> toProbability
@@ -1,12 +0,0 @@
-<ProjectConfiguration>
- <CopyReferencedAssembliesToWorkspace>false</CopyReferencedAssembliesToWorkspace>
- <RunPreBuildEvents>false</RunPreBuildEvents>
- <RunPostBuildEvents>false</RunPostBuildEvents>
- <PreviouslyBuiltSuccessfully>true</PreviouslyBuiltSuccessfully>
- <InstrumentAssembly>true</InstrumentAssembly>
- <IncludeStaticReferencesInWorkspace>true</IncludeStaticReferencesInWorkspace>
- <DefaultTestTimeout>60000</DefaultTestTimeout>
- <UseBuildConfiguration></UseBuildConfiguration>
- <UseCPUArchitecture>AutoDetect</UseCPUArchitecture>
- <AdditionalFilesToInclude>..\..\..\tools\FSharp\*.dll;..\..\..\tools\FSharp\*.exe</AdditionalFilesToInclude>
-</ProjectConfiguration>
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.30703</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{03dd56f1-efb8-4ea0-a050-5989c16b6b55}</ProjectGuid>
- <OutputType>Library</OutputType>
- <RootNamespace>KataYahtzee</RootNamespace>
- <AssemblyName>KataProbability</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <Name>KataYahtzee</Name>
- <FscToolPath>..\..\..\tools\FSharp\</FscToolPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>3</WarningLevel>
- <DocumentationFile>bin\Debug\KataProbability.XML</DocumentationFile>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <WarningLevel>3</WarningLevel>
- <DocumentationFile>bin\Release\KataYahtzee.XML</DocumentationFile>
- </PropertyGroup>
- <Import Project="..\..\..\tools\FSharp\Microsoft.FSharp.Targets" />
- <ItemGroup>
- <Content Include="Description.txt">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Compile Include="Model.fs" />
- <Compile Include="Specs.fs" />
- <None Include="packages.config" />
- </ItemGroup>
- <ItemGroup>
- <Reference Include="FSharp.Core">
- <HintPath>..\..\..\tools\FSharp\FSharp.Core.dll</HintPath>
- </Reference>
- <Reference Include="FSharp.PowerPack">
- <HintPath>..\..\..\tools\PowerPack\FSharp.PowerPack.dll</HintPath>
- </Reference>
- <Reference Include="mscorlib" />
- <Reference Include="nunit.framework">
- <Private>True</Private>
- </Reference>
- <Reference Include="System" />
- <ProjectReference Include="..\..\app\NaturalSpec\NaturalSpec.fsproj">
- <Name>NaturalSpec</Name>
- <Project>{3019240d-bbd3-4951-9c5e-4b343638bd4b}</Project>
- <Private>True</Private>
- </ProjectReference>
- </ItemGroup>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
@@ -1,12 +0,0 @@
-<ProjectConfiguration>
- <CopyReferencedAssembliesToWorkspace>false</CopyReferencedAssembliesToWorkspace>
- <RunPreBuildEvents>false</RunPreBuildEvents>
- <RunPostBuildEvents>false</RunPostBuildEvents>
- <PreviouslyBuiltSuccessfully>true</PreviouslyBuiltSuccessfully>
- <InstrumentAssembly>true</InstrumentAssembly>
- <IncludeStaticReferencesInWorkspace>true</IncludeStaticReferencesInWorkspace>
- <DefaultTestTimeout>60000</DefaultTestTimeout>
- <UseBuildConfiguration></UseBuildConfiguration>
- <UseCPUArchitecture>AutoDetect</UseCPUArchitecture>
- <AdditionalFilesToInclude>..\..\..\tools\FSharp\*.dll;..\..\..\tools\FSharp\*.exe</AdditionalFilesToInclude>
-</ProjectConfiguration>
@@ -1,104 +0,0 @@
-module Probability.Specs
-
-open NaturalSpec
-open Model
-
-let combined_with x y=
- printMethod ""
- combine x y
-
-let inversed x=
- printMethod ""
- inverse x
-
-let using_either_with x y=
- printMethod ""
- either x y
-
-[<Scenario>]
-let ``Certainly combined with Certainly should be Certainly`` () =
- Given Certainly
- |> When combined_with Certainly
- |> It should equal Certainly
- |> Verify
-
-[<Scenario>]
-let ``Certainly combined with Impossible should be Impossible`` () =
- Given Certainly
- |> When combined_with Impossible
- |> It should equal Impossible
- |> Verify
-
-[<Scenario>]
-let ``Impossible combined with Certainly should be Impossible`` () =
- Given Impossible
- |> When combined_with Certainly
- |> It should equal Impossible
- |> Verify
-
-let oneHalf = toProbability <| 1N/2N
-let oneThird = toProbability <| 1N/3N
-let twoThirds = toProbability <| 2N/3N
-
-[<Scenario>]
-let ``One half combined with Certainly should be one half`` () =
- Given oneHalf
- |> When combined_with Certainly
- |> It should equal oneHalf
- |> Verify
-
-[<Scenario>]
-let ``One half combined with two thirds should be one third`` () =
- Given oneHalf
- |> When combined_with twoThirds
- |> It should equal oneThird
- |> Verify
-
-[<Scenario>]
-let ``The inverse of Impossible should be Certainly`` () =
- Given Impossible
- |> When inversed
- |> It should equal Certainly
- |> Verify
-
-[<Scenario>]
-let ``The inverse of Certainly should be Impossible`` () =
- Given Certainly
- |> When inversed
- |> It should equal Impossible
- |> Verify
-
-[<Scenario>]
-let ``The inverse of one third should be two thirds`` () =
- Given oneThird
- |> When inversed
- |> It should equal twoThirds
- |> Verify
-
-[<Scenario>]
-let ``Certainly or Certainly should be Certainly`` () =
- Given Certainly
- |> When using_either_with Certainly
- |> It should equal Certainly
- |> Verify
-
-[<Scenario>]
-let ``Certainly or Impossible should be Certainly`` () =
- Given Certainly
- |> When using_either_with Impossible
- |> It should equal Certainly
- |> Verify
-
-[<Scenario>]
-let ``Impossible or two thirds should be two thirds`` () =
- Given Impossible
- |> When using_either_with twoThirds
- |> It should equal twoThirds
- |> Verify
-
-[<Scenario>]
-let ``oneThird or oneHalf should be two thirds`` () =
- Given oneThird
- |> When using_either_with oneHalf
- |> It should equal twoThirds
- |> Verify
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="NUnit" version="2.6.1" targetFramework="net35" />
-</packages>

0 comments on commit 3ded92d

Please sign in to comment.