public static void ToString___Should_return_friendly_string_representation_of_object___When_called() { // Arrange var systemUnderTest = new GenericUnbounded(); // Act var toString = systemUnderTest.ToString(); // Assert toString.Should().Be("generic unbounded"); }
public static void NotEqualsOperator___Should_return_false___When_both_sides_of_operator_are_null() { // Arrange GenericUnbounded systemUnderTest1 = null; GenericUnbounded systemUnderTest2 = null; // Act var result = systemUnderTest1 != systemUnderTest2; // Assert result.Should().BeFalse(); }
public static void CompareTo___Should_throw_ArgumentException___When_calling_non_typed_overload_and_other_object_is_null() { // Arrange var systemUnderTest1 = A.Dummy <GenericUnbounded>(); GenericUnbounded systemUnderTest2 = null; // Act var ex = Record.Exception(() => systemUnderTest1.CompareTo((object)systemUnderTest2)); // Assert ex.Should().BeOfType <ArgumentException>(); }
public static void CompareTo___Should_return_0___When_calling_non_typed_overload_and_other_object_is_not_null() { // Arrange var systemUnderTest1 = new GenericUnbounded(); var systemUnderTest2 = new GenericUnbounded(); // Act var result = systemUnderTest1.CompareTo((object)systemUnderTest2); // Assert result.Should().Be(0); }
public static void GreaterThanOrEqualToOperator___Should_return_true___When_left_side_of_operator_is_not_null_and_right_side_is_null() { // Arrange var systemUnderTest1 = A.Dummy <GenericUnbounded>(); GenericUnbounded systemUnderTest2 = null; // Act var result = systemUnderTest1 >= systemUnderTest2; // Assert result.Should().BeTrue(); }
public static void GreaterThanOrEqualToOperator___Should_return_true___When_both_sides_of_operator_are_null() { // Arrange GenericUnbounded systemUnderTest1 = null; GenericUnbounded systemUnderTest2 = null; // Act var result = systemUnderTest1 >= systemUnderTest2; // Assert result.Should().BeTrue(); }
public static void GreaterThanOperator___Should_return_false___When_left_side_of_operator_is_null_and_right_side_is_not_null() { // Arrange GenericUnbounded systemUnderTest1 = null; var systemUnderTest2 = A.Dummy <GenericUnbounded>(); // Act var result = systemUnderTest1 > systemUnderTest2; // Assert result.Should().BeFalse(); }
public static void GetHashCode___Should_not_be_equal_for_two_UnitOfKind_objects___When_they_are_of_different_kinds_but_have_the_same_granularity_and_same_property_values() { // Arrange var calendarUnbounded = A.Dummy <CalendarUnbounded>(); var fiscalUnbounded = new FiscalUnbounded(); var genericUnbounded = new GenericUnbounded(); var calendarYear = A.Dummy <CalendarYear>(); var fiscalYear = new FiscalYear(calendarYear.Year); var genericYear = new GenericYear(calendarYear.Year); var calendarQuarter = A.Dummy <CalendarQuarter>(); var fiscalQuarter = new FiscalQuarter(calendarQuarter.Year, calendarQuarter.QuarterNumber); var genericQuarter = new GenericQuarter(calendarQuarter.Year, calendarQuarter.QuarterNumber); var calendarMonth = A.Dummy <CalendarMonth>(); var fiscalMonth = new FiscalMonth(calendarMonth.Year, calendarMonth.MonthNumber); var genericMonth = new GenericMonth(calendarMonth.Year, calendarMonth.MonthNumber); // Act var calendarUnboundedHashCode = calendarUnbounded.GetHashCode(); var fiscalUnboundedHashCode = fiscalUnbounded.GetHashCode(); var genericUnboundedHashCode = genericUnbounded.GetHashCode(); var calendarYearHashCode = calendarYear.GetHashCode(); var fiscalYearHashCode = fiscalYear.GetHashCode(); var genericYearHashCode = genericYear.GetHashCode(); var calendarQuarterHashCode = calendarQuarter.GetHashCode(); var fiscalQuarterHashCode = fiscalQuarter.GetHashCode(); var genericQuarterHashCode = genericQuarter.GetHashCode(); var calendarMonthHashCode = calendarMonth.GetHashCode(); var fiscalMonthHashCode = fiscalMonth.GetHashCode(); var genericMonthHashCode = genericMonth.GetHashCode(); // Assert calendarUnboundedHashCode.Should().NotBe(fiscalUnboundedHashCode); calendarUnboundedHashCode.Should().NotBe(genericUnboundedHashCode); fiscalUnboundedHashCode.Should().NotBe(genericUnboundedHashCode); calendarYearHashCode.Should().NotBe(fiscalYearHashCode); calendarYearHashCode.Should().NotBe(genericYearHashCode); fiscalYearHashCode.Should().NotBe(genericYearHashCode); calendarQuarterHashCode.Should().NotBe(fiscalQuarterHashCode); calendarQuarterHashCode.Should().NotBe(genericQuarterHashCode); fiscalQuarterHashCode.Should().NotBe(genericQuarterHashCode); calendarMonthHashCode.Should().NotBe(fiscalMonthHashCode); calendarMonthHashCode.Should().NotBe(genericMonthHashCode); fiscalMonthHashCode.Should().NotBe(genericMonthHashCode); }
public static void NotEqualsOperator___Should_return_true___When_one_side_of_operator_is_null_and_the_other_side_is_not_null() { // Arrange GenericUnbounded systemUnderTest1 = null; var systemUnderTest2 = A.Dummy <GenericUnbounded>(); // Act var result1 = systemUnderTest1 != systemUnderTest2; var result2 = systemUnderTest2 != systemUnderTest1; // Assert result1.Should().BeTrue(); result2.Should().BeTrue(); }
/// <summary> /// Initializes a new instance of the <see cref="GenericUnboundedReportingPeriod"/> class. /// </summary> /// <param name="start">The start of the reporting period.</param> /// <param name="end">The end of the reporting period.</param> public GenericUnboundedReportingPeriod( GenericUnbounded start, GenericUnbounded end) : base(start, end) { }