public void ReturnsNullForEmptyString() { var sut = new OrdinalDateParser(); var result = sut.Parse(null); Assert.IsFalse(result.HasValue); }
public void ParsesValidOridnalDateString(string input, DateTime expectedResult) { var sut = new OrdinalDateParser(); var result = sut.Parse(input); Assert.IsTrue(result.HasValue); Assert.AreEqual(expectedResult, result.Value); }
public void ThrowsExceptionWhenBadFormat() { var sut = new OrdinalDateParser(); Assert.Throws <ArgumentException>(() => sut.Parse("I really am a date")); }