public void ExtractDate_Null_WhenEgnIsValid(string egnToTest) { var extractDate = new ExtractDate(); var result = extractDate.TryExtractDate(egnToTest); result .Should() .BeNull(); }
public void ExtractDate_ExactDate_WhenEgnIsValid_After2000_LastTwoMonths() { var egnToTest = "7851161111"; var extractDate = new ExtractDate(); var result = extractDate.TryExtractDate(egnToTest); result .Should() .Be(new DateTime(2078, 11, 16)); }
public void ExtractDate_ExactDate_WhenEgnIsValid_Between1800_1899_LastTWoMonths() { var egnToTest = "7831161111"; var extractDate = new ExtractDate(); var result = extractDate.TryExtractDate(egnToTest); result .Should() .Be(new DateTime(1878, 11, 16)); }
public void ExtractDate_ExactDate_WhenEgnIsValid_Between1900_1999() { var egnToTest = "7811161111"; var extractDate = new ExtractDate(); var result = extractDate.TryExtractDate(egnToTest); result .Should() .Be(new DateTime(1978, 11, 16)); }