From 66a019af3286567e13880f6a5abd7205856dab0c Mon Sep 17 00:00:00 2001 From: Lars Kemmann Date: Fri, 26 Jan 2024 22:08:11 -0500 Subject: [PATCH] WIP --- .../FindRequirementApprovalsTest.cs | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/test/CareTogether.Core.Test/ApprovalCalculationTests/FindRequirementApprovalsTest.cs b/test/CareTogether.Core.Test/ApprovalCalculationTests/FindRequirementApprovalsTest.cs index 7444d12a..6ebfa1d2 100644 --- a/test/CareTogether.Core.Test/ApprovalCalculationTests/FindRequirementApprovalsTest.cs +++ b/test/CareTogether.Core.Test/ApprovalCalculationTests/FindRequirementApprovalsTest.cs @@ -8,7 +8,7 @@ namespace CareTogether.Core.Test.ApprovalCalculationTests; public class FindRequirementApprovalsTest { [TestMethod] - public void Foo() + public void EmptyInputsReturnsNull() { var result = SharedCalculations.FindRequirementApprovals( "A", null, @@ -16,8 +16,30 @@ public void Foo() H.Exempted([]) ); - Assert.Inconclusive("Not implemented!"); Assert.IsNull(result); - H.AssertDatesAre(result); + } + + [TestMethod] + public void EmptyInputsWithSupersededDateReturnsNull() + { + var result = SharedCalculations.FindRequirementApprovals( + "A", H.DT(20), + H.Completed([]), + H.Exempted([]) + ); + + Assert.IsNull(result); + } + + [TestMethod] + public void NonMatchingInputsReturnsNull() + { + var result = SharedCalculations.FindRequirementApprovals( + "A", null, + H.Completed([("B", 2), ("C", 3)]), + H.Exempted([("D", 4)]) + ); + + Assert.IsNull(result); } }