diff --git a/BrokerageLib/BrokerageLib.csproj b/BrokerageLib/BrokerageLib.csproj
new file mode 100644
index 0000000..20ff8b6
--- /dev/null
+++ b/BrokerageLib/BrokerageLib.csproj
@@ -0,0 +1,61 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {07F455FF-CE11-40F2-A66E-95FA497522FB}
+ Library
+ Properties
+ BrokerageLib
+ BrokerageLib
+ v4.6
+ 512
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BrokerageLib/CommissionCalculator.cs b/BrokerageLib/CommissionCalculator.cs
new file mode 100644
index 0000000..f6e53e3
--- /dev/null
+++ b/BrokerageLib/CommissionCalculator.cs
@@ -0,0 +1,35 @@
+using System;
+
+namespace BrokerageLib {
+
+ public class CommissionCalculator {
+
+
+ public decimal DetermineVariableRate(int unitsSold, decimal unitPrice) {
+
+ // Sales representative gets top commission rate
+ // if they sell over the sales threshold amount
+ // or if they sell more than the max unit threshold
+ if (unitsSold < 0)
+ {
+ throw new ArgumentOutOfRangeException("UnitsSold cannot be less than zero.");
+ }
+
+ if (unitPrice < 0)
+ {
+ throw new ArgumentOutOfRangeException("unitPrice cannot be less than zero.");
+ }
+
+ decimal grossSale = unitsSold * unitPrice;
+ if (grossSale > Constants.CommissionThreshold.SalesAmount || unitsSold > Constants.CommissionThreshold.UnitAmount)
+ {
+ return grossSale * Constants.CommissionRate.Top;
+ }
+ else
+ {
+
+ return grossSale * Constants.CommissionRate.Standard;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/BrokerageLib/CommissionConstants.cs b/BrokerageLib/CommissionConstants.cs
new file mode 100644
index 0000000..ed8533e
--- /dev/null
+++ b/BrokerageLib/CommissionConstants.cs
@@ -0,0 +1,21 @@
+namespace BrokerageLib {
+
+ public class Constants {
+
+ public class CommissionRate {
+ public const decimal Standard = 0.08m;
+ public const decimal Earner = 0.11m;
+ public const decimal Top = 0.14m;
+ }
+
+ public class Discount {
+ public const decimal PreferredCustomer = 0.2m;
+ public const decimal BulkOrder = 0.5m;
+ }
+
+ public class CommissionThreshold {
+ public const decimal SalesAmount = 12000m;
+ public const decimal UnitAmount = 400m;
+ }
+ }
+}
\ No newline at end of file
diff --git a/BrokerageLib/PaymentDate.cs b/BrokerageLib/PaymentDate.cs
new file mode 100644
index 0000000..d0fe1c8
--- /dev/null
+++ b/BrokerageLib/PaymentDate.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace BrokerageLib.PaymentSystem {
+ public class PaymentDate {
+ ///
+ /// Calculates a payment date 30 days in the future
+ /// from the provided date.
+ /// If the payment date is on a weekend,
+ /// then move it to the first work day after the
+ /// proposed date
+ ///
+ /// the date to use as starting date.
+ ///
+ public DateTime CalculateFuturePaymentDate(DateTime startingDate) {
+ var tempDate = startingDate.AddDays(30);
+ switch (tempDate.DayOfWeek)
+ {
+ case DayOfWeek.Saturday:
+ tempDate = tempDate.AddDays(2);
+ break;
+ case DayOfWeek.Sunday:
+ tempDate = tempDate.AddDays(1); // Error in our code here!
+ break;
+
+ }
+ return tempDate;
+
+ }
+ }
+}
diff --git a/BrokerageLib/Properties/AssemblyInfo.cs b/BrokerageLib/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..fd830e0
--- /dev/null
+++ b/BrokerageLib/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using 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.
+[assembly: AssemblyTitle("BrokerageLib")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("BrokerageLib")]
+[assembly: AssemblyCopyright("Copyright © 2016")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 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.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("07f455ff-ce11-40f2-a66e-95fa497522fb")]
+
+// 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:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/BrokerageLib/Scenarios/CommisionCalcScenario.txt b/BrokerageLib/Scenarios/CommisionCalcScenario.txt
new file mode 100644
index 0000000..5f28270
--- /dev/null
+++ b/BrokerageLib/Scenarios/CommisionCalcScenario.txt
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/BrokerageLib/Scenarios/PaymentDateScenario.txt b/BrokerageLib/Scenarios/PaymentDateScenario.txt
new file mode 100644
index 0000000..8fba1fc
--- /dev/null
+++ b/BrokerageLib/Scenarios/PaymentDateScenario.txt
@@ -0,0 +1,10 @@
+[ The Given-When-Then pattern ]
+To calculate the next payment date for our customer bills
+
+Given a valid start date
+ When the future calculated payment date falls on a weekday
+ Then use the calculated date
+
+Given a valid start date
+ When the future calculated payment date falls on a weekend
+ Then use the first Monday after calculated date
diff --git a/StartingSolution.sln b/StartingSolution.sln
new file mode 100644
index 0000000..f3a32f6
--- /dev/null
+++ b/StartingSolution.sln
@@ -0,0 +1,37 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29509.3
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BrokerageLib", "BrokerageLib\BrokerageLib.csproj", "{07F455FF-CE11-40F2-A66E-95FA497522FB}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestingLib", "TestingLib\TestingLib.csproj", "{077F4E49-2A80-463A-B2D0-805DACB80469}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestRunner", "TestRunner\TestRunner.csproj", "{65401167-7B49-4C88-AC43-F2B4A213951B}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {07F455FF-CE11-40F2-A66E-95FA497522FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {07F455FF-CE11-40F2-A66E-95FA497522FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {07F455FF-CE11-40F2-A66E-95FA497522FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {07F455FF-CE11-40F2-A66E-95FA497522FB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {077F4E49-2A80-463A-B2D0-805DACB80469}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {077F4E49-2A80-463A-B2D0-805DACB80469}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {077F4E49-2A80-463A-B2D0-805DACB80469}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {077F4E49-2A80-463A-B2D0-805DACB80469}.Release|Any CPU.Build.0 = Release|Any CPU
+ {65401167-7B49-4C88-AC43-F2B4A213951B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {65401167-7B49-4C88-AC43-F2B4A213951B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {65401167-7B49-4C88-AC43-F2B4A213951B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {65401167-7B49-4C88-AC43-F2B4A213951B}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {06FF9609-A8E6-43CD-8D0D-A55B7459171D}
+ EndGlobalSection
+EndGlobal
diff --git a/TestRunner/App.config b/TestRunner/App.config
new file mode 100644
index 0000000..56efbc7
--- /dev/null
+++ b/TestRunner/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/TestRunner/App.xaml b/TestRunner/App.xaml
new file mode 100644
index 0000000..ee4c373
--- /dev/null
+++ b/TestRunner/App.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/TestRunner/App.xaml.cs b/TestRunner/App.xaml.cs
new file mode 100644
index 0000000..cbb8e22
--- /dev/null
+++ b/TestRunner/App.xaml.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace TestRunner
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/TestRunner/MainWindow.xaml b/TestRunner/MainWindow.xaml
new file mode 100644
index 0000000..8eea329
--- /dev/null
+++ b/TestRunner/MainWindow.xaml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/TestRunner/MainWindow.xaml.cs b/TestRunner/MainWindow.xaml.cs
new file mode 100644
index 0000000..fdf7f7a
--- /dev/null
+++ b/TestRunner/MainWindow.xaml.cs
@@ -0,0 +1,41 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using TestingLib;
+
+namespace TestRunner
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ private ObservableCollection _results = new ObservableCollection();
+ public MainWindow()
+ {
+ InitializeComponent();
+ this.DataContext = _results;
+ }
+
+ private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
+ {
+ var testClass = new TestingLib.TestThePaymentDate();
+ _results.Add( testClass.DateIs30DaysInFuture());
+ _results.Add(testClass.ReturnsMondayIfProposedIsSaturday());
+ _results.Add(testClass.ReturnsMondayIfProposedIsSunday());
+
+ }
+ }
+}
diff --git a/TestRunner/Properties/AssemblyInfo.cs b/TestRunner/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..069d0a3
--- /dev/null
+++ b/TestRunner/Properties/AssemblyInfo.cs
@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// 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.
+[assembly: AssemblyTitle("TestRunner")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("TestRunner")]
+[assembly: AssemblyCopyright("Copyright © 2019")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 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.
+[assembly: ComVisible(false)]
+
+//In order to begin building localizable applications, set
+//CultureYouAreCodingWith in your .csproj file
+//inside a . For example, if you are using US english
+//in your source files, set the to en-US. Then uncomment
+//the NeutralResourceLanguage attribute below. Update the "en-US" in
+//the line below to match the UICulture setting in the project file.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
+
+
+// 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:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/TestRunner/Properties/Resources.Designer.cs b/TestRunner/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..641a772
--- /dev/null
+++ b/TestRunner/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace TestRunner.Properties
+{
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TestRunner.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/TestRunner/Properties/Resources.resx b/TestRunner/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/TestRunner/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/TestRunner/Properties/Settings.Designer.cs b/TestRunner/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..5916c43
--- /dev/null
+++ b/TestRunner/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace TestRunner.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/TestRunner/Properties/Settings.settings b/TestRunner/Properties/Settings.settings
new file mode 100644
index 0000000..033d7a5
--- /dev/null
+++ b/TestRunner/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/TestRunner/TestRunner.csproj b/TestRunner/TestRunner.csproj
new file mode 100644
index 0000000..9c32b74
--- /dev/null
+++ b/TestRunner/TestRunner.csproj
@@ -0,0 +1,104 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {65401167-7B49-4C88-AC43-F2B4A213951B}
+ WinExe
+ TestRunner
+ TestRunner
+ v4.7.2
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+ true
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ App.xaml
+ Code
+
+
+ MainWindow.xaml
+ Code
+
+
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+
+
+
+
+
+ {077f4e49-2a80-463a-b2d0-805dacb80469}
+ TestingLib
+
+
+
+
\ No newline at end of file
diff --git a/TestingLib/Assert.cs b/TestingLib/Assert.cs
new file mode 100644
index 0000000..b16baa4
--- /dev/null
+++ b/TestingLib/Assert.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace TestingLib
+{
+ public class Assert
+ {
+ public static ObservableCollection TestResults { get; set; }
+
+ static Assert()
+ {
+ TestResults = new ObservableCollection();
+ }
+ public static void AreEqual(object first,
+ object second,
+ string message,
+ [CallerMemberName] string methodName = null)
+ {
+ var testInfo = new UnitTestInfo();
+ if (first.Equals(second))
+ {
+ testInfo.DidTestPass = true;
+ }
+ else
+ {
+ testInfo.DidTestPass = false;
+ testInfo.TestFailureMessage = message;
+ }
+ testInfo.MethodName = methodName;
+ TestResults.Add(testInfo);
+ }
+ }
+}
diff --git a/TestingLib/TestThePaymentDate.cs b/TestingLib/TestThePaymentDate.cs
new file mode 100644
index 0000000..0ebd8e3
--- /dev/null
+++ b/TestingLib/TestThePaymentDate.cs
@@ -0,0 +1,85 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using SUT = BrokerageLib;
+
+namespace TestingLib
+{
+ public class TestThePaymentDate
+ {
+ public UnitTestInfo DateIs30DaysInFuture()
+ {
+ var testInfo = new UnitTestInfo();
+
+ var pd = new SUT.PaymentSystem.PaymentDate();
+ var sampleDate = DateTime.Parse("2019-12-16");
+
+ var futureDate = pd.CalculateFuturePaymentDate(sampleDate);
+
+ if (futureDate.Equals(sampleDate.AddDays(30)))
+ {
+ testInfo.DidTestPass = true;
+ }
+ else
+ {
+ testInfo.DidTestPass = false;
+ testInfo.TestFailureMessage = $"Expected date is not 30 days in the future.";
+ }
+ testInfo.MethodName = "DateIs30DaysInFuture";
+ return testInfo;
+ }
+ public UnitTestInfo ReturnsMondayIfProposedIsSunday()
+ {
+ var testInfo = new UnitTestInfo();
+
+ var pd = new SUT.PaymentSystem.PaymentDate();
+ var sampleDate = DateTime.Parse("2019-12-17");
+
+ var futureDate = pd.CalculateFuturePaymentDate(sampleDate);
+
+ if (futureDate.DayOfWeek == DayOfWeek.Monday)
+ {
+ testInfo.DidTestPass = true;
+ }
+ else
+ {
+ testInfo.DidTestPass = false;
+ testInfo.TestFailureMessage = $"Expected date is not Monday.";
+ }
+
+ testInfo.MethodName = "ReturnsMondayIfProposedIsSunday";
+ return testInfo;
+ }
+ public UnitTestInfo ReturnsMondayIfProposedIsSaturday()
+ {
+ var testInfo = new UnitTestInfo();
+
+ var pd = new SUT.PaymentSystem.PaymentDate();
+ var sampleDate = DateTime.Parse("2019-12-15");
+
+ var futureDate = pd.CalculateFuturePaymentDate(sampleDate);
+
+ if (futureDate.DayOfWeek == DayOfWeek.Monday)
+ {
+ testInfo.DidTestPass = true;
+ }
+ else
+ {
+ testInfo.DidTestPass = false;
+ testInfo.TestFailureMessage = $"Expected date is not Monday.";
+ }
+
+ testInfo.MethodName = "ReturnsMondayIfProposedIsSaturday";
+ return testInfo;
+ }
+
+ }
+
+ public struct UnitTestInfo
+ {
+ public bool DidTestPass { get; set; }
+ public string TestFailureMessage { get; set; }
+ public string MethodName { get; set; }
+
+ }
+}
diff --git a/TestingLib/TestingLib.csproj b/TestingLib/TestingLib.csproj
new file mode 100644
index 0000000..09bbb82
--- /dev/null
+++ b/TestingLib/TestingLib.csproj
@@ -0,0 +1,11 @@
+
+
+
+ netstandard2.0
+
+
+
+
+
+
+