Infört Assert class och förenklat koden

This commit is contained in:
2019-11-18 23:31:09 +01:00
parent eef116b5f6
commit 094b1dfc34
2 changed files with 14 additions and 52 deletions

View File

@ -22,19 +22,18 @@ namespace TestRunner
/// </summary>
public partial class MainWindow : Window
{
private ObservableCollection<TestingLib.UnitTestInfo> _results = new ObservableCollection<UnitTestInfo>();
public MainWindow()
public MainWindow()
{
InitializeComponent();
this.DataContext = _results;
this.DataContext = TestingLib.Assert.TestResults;
}
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());
testClass.DateIs30DaysInFuture();
testClass.ReturnsMondayIfProposedIsSaturday();
testClass.ReturnsMondayIfProposedIsSunday();
}
}