public void ToStringShouldReturnExpectedResult() { var target = new FiscalWeek( new DateTime( 2013, 6, 23 ) ); var expected = string.Format( CultureInfo.CurrentCulture, "FirstDay = {0:d}, LastDay = {1:d}", target.FirstDay, target.LastDay ); var actual = target.ToString(); Assert.Equal( expected, actual ); }
public void ConstructorShouldDeriveLastDayFromFirstDay() { var firstDay = new DateTime( 2013, 6, 23 ); var expected = new DateTime( 2013, 6, 29 ); var target = new FiscalWeek( firstDay ); var actual = target.LastDay; Assert.Equal( expected, actual ); }
public void ConstructorShouldSetFirstAndLastDay() { var firstDay = new DateTime( 2013, 6, 23 ); var lastDay = new DateTime( 2013, 6, 29 ); var target = new FiscalWeek( firstDay, lastDay ); Assert.Equal( firstDay, target.FirstDay ); Assert.Equal( lastDay, target.LastDay ); }