public TheoryDataItem(int expectedCYYMMDD, int expectedYear, int expectedMonth, int expectedDay, IntCYYMMDD actual, string testDescription) { Actual = actual; ExpectedCYYMMDD = expectedCYYMMDD; ExpectedYear = expectedYear; ExpectedMonth = expectedMonth; ExpectedDay = expectedDay; TestDescription = testDescription; }
public void ConstructorEmpty_DoesNotThrowAndHasDefaultValue() { // Arrange & Act IntCYYMMDD actual = null; var exception = Record.Exception(() => actual = new IntCYYMMDD()); // Assert Assert.Null(exception); Assert.Equal(0, actual.CYYMMDD); }
public void ConstructorCandYYandMMandDD(IntCYYMMDDTheoryDataItem data) { // Arrange & Act var actual = new IntCYYMMDD(data.Test.C, data.Test.YY, data.Test.MM, data.Test.DD); // Assert Assert.Equal(data.Expected.DD, actual.DD); Assert.Equal(data.Expected.Date.Day, actual.Day); Assert.Equal(data.Expected.Date, actual.Date); Assert.Equal(data.Expected.CYYMMDD, actual.CYYMMDD); }
public void ConstructorYearAndMonthAndDay(IntCYYMMDDTheoryDataItem data) { // Arrange & Act var actual = new IntCYYMMDD(data.Test.Date.Year, data.Test.Date.Month, data.Test.Date.Day); // Assert Assert.Equal(data.Expected.DD, actual.DD); Assert.Equal(data.Expected.Date.Day, actual.Day); Assert.Equal(data.Expected.Date, actual.Date); Assert.Equal(data.Expected.CYYMMDD, actual.CYYMMDD); }
public IntCYYMMDD_HHMMSS(int year, int month, int day, int hour = 0, int minute = 0, int second = 0) { IntCYYMMDD = new IntCYYMMDD(year, month, day); IntHHMMSS = new IntHHMMSS(hour, minute, second); }
public IntCYYMMDD_HHMMSS(IntCYYMMDD cyymmdd, IntHHMMSS?hhmmss = null) : this() { IntCYYMMDD = cyymmdd; IntHHMMSS = hhmmss ?? new IntHHMMSS(0); }