public void ToString_EqualsExpectedResult(HourTestItem <string> hourTestItem) { var day = hourTestItem.Create(); var formatted = day.ToString(); Assert.AreEqual(hourTestItem.ExpectedResult, formatted); }
public void Parse_EqualsExpectedResult(HourTestItem <string> hourTestItem) { var dayFromText = Hour.Parse(hourTestItem.ExpectedResult); // TODO bad use of Expected result? var expectedDay = hourTestItem.Create(); Assert.AreEqual(expectedDay, dayFromText); }
public void Deconstruct_ReturnsComponentsUsedToConstruct(HourTestItem testItem) { var hour = testItem.Create(); (int year, int monthOfYear, int dayOfMonth, int hourOfDay) = hour; Assert.AreEqual(testItem.YearNum, year); Assert.AreEqual(testItem.MonthOfYear, monthOfYear); Assert.AreEqual(testItem.DayOfMonth, dayOfMonth); Assert.AreEqual(testItem.HourOfDay, hourOfDay); }