public void null比較() { HourAndMinute sut = null; HourAndMinute other = null; Assert.True(sut == other); }
public void 十時の方が小さい() { var sut = new HourAndMinute(10, 0); var other = new HourAndMinute(12, 0); Assert.True(sut < other); }
public void 時間が一緒ではない() { var sut = new HourAndMinute(0, 0); var other = new HourAndMinute(23, 59); Assert.True(sut != other); }
public void 四十五分の方が大きい() { var sut = new HourAndMinute(12, 45); var other = new HourAndMinute(12, 0); Assert.True(sut > other); }
public void どちらも同じ() { var sut = new HourAndMinute(12, 0); var other = new HourAndMinute(12, 0); Assert.True(sut == other); }
public void 利用時間帯のIsContains失敗パターン(HourAndMinute sut_start, HourAndMinute sut_end, HourAndMinute other_start, HourAndMinute other_end) { var sut = new SpanOfTime(sut_start, sut_end); var other = new SpanOfTime(other_start, other_end); Assert.False(sut.IsContains(other)); }
public void 利用時間帯の比較テストNGパターン(HourAndMinute sut_start, HourAndMinute sut_end, HourAndMinute other_start, HourAndMinute other_end) { var sut = new SpanOfTime(sut_start, sut_end); var other = new SpanOfTime(other_start, other_end); Assert.True(sut.IsOverRap(other)); }
public void 時分の差を計算してマイナスになる() { var sut = new HourAndMinute(16, 0); var other = new HourAndMinute(13, 15); Assert.Throws <ArgumentException>(() => { var result = other - sut; }); }
public void 時分の差を計算する() { var sut = new HourAndMinute(9, 0); var other = new HourAndMinute(13, 15); var result = other - sut; Assert.Equal(4, result.Hour); Assert.Equal(15, result.Minute); }
public void 繰り下げのある時分の差を計算する() { var sut = new HourAndMinute(10, 45); var other = new HourAndMinute(13, 15); var result = other - sut; Assert.Equal(2, result.Hour); Assert.Equal(30, result.Minute); }
public void 何時間か取得できる() { var start = new HourAndMinute(10, 45); var end = new HourAndMinute(13, 15); var span = new SpanOfTime(start, end); HourAndMinute sut = span.Difference(); Assert.Equal(2, sut.Hour); Assert.Equal(30, sut.Minute); }