-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b046a75
commit a775568
Showing
12 changed files
with
76 additions
and
641 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{DF09704F-4B67-4594-B545-053E3024F59B}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>RiffChallengeDraft.Core</RootNamespace> | ||
<AssemblyName>RiffChallengeDraft.Core</AssemblyName> | ||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
</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>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Entities\Genre.cs" /> | ||
<Compile Include="Entities\Contestant.cs" /> | ||
<Compile Include="Entities\WeeklyTheme.cs" /> | ||
<Compile Include="Helpers\EnumMethods.cs" /> | ||
<Compile Include="Helpers\StringExtensions.cs" /> | ||
<Compile Include="Helpers\TableParserExtensions.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- 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> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.1</TargetFramework> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,42 @@ | ||
using System; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using NUnit.Framework; | ||
using RiffChallengeDraft.Cli; | ||
|
||
namespace RiffChallengeDraft.Tests | ||
{ | ||
[TestClass] | ||
public class DraftFacilitatorTest | ||
{ | ||
DraftFacilitator enabler = new DraftFacilitator(); | ||
|
||
/// <summary> | ||
/// If we can draw 1000 times and the number of successfull theme weeks is less than 30%, then we need to adjust the algorithm | ||
/// </summary> | ||
[TestMethod] | ||
[Test] | ||
public void TestThemeWeekProbability() | ||
{ | ||
// Arrage | ||
const int NUM_ITERATIONS = 100000; | ||
int iterations = NUM_ITERATIONS; | ||
int successCount = 0; | ||
|
||
// Act | ||
while (iterations > 0) | ||
{ | ||
successCount += (enabler.WeeklyTheme.IsThemeWeek) ? 1 : 0; | ||
iterations--; | ||
} | ||
//Assume over 30% success rate when choosing WeeklyTheme | ||
Assert.IsTrue(successCount > 0 && successCount > (NUM_ITERATIONS / 3)); | ||
// Assert | ||
// Assume over 30% success rate when choosing WeeklyTheme | ||
Assert.Multiple(() => | ||
{ | ||
Assert.That(successCount, Is.Positive); | ||
Assert.That(successCount, Is.GreaterThan(NUM_ITERATIONS / 3)); | ||
}); | ||
} | ||
|
||
[TestMethod] | ||
[Test] | ||
public void TestConstructor() | ||
{ | ||
Assert.IsTrue(enabler.ContestantPool != null); | ||
Assert.That(enabler.ContestantPool, Is.Not.Null); | ||
} | ||
} | ||
} |
Oops, something went wrong.