Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 [Theory, MemberData(nameof(IntCYYMMDDTheoryDataItem.Instance), MemberType = typeof(IntCYYMMDDTheoryDataItem))] public void SetCYYMMDD(IntCYYMMDDTheoryDataItem data) => Assert.Equal(data.Expected.CYYMMDD, new IntCYYMMDD {
     CYYMMDD = data.Test.CYYMMDD
 }.CYYMMDD);
Exemple #4
0
 [Theory, MemberData(nameof(IntCYYMMDDTheoryDataItem.Instance), MemberType = typeof(IntCYYMMDDTheoryDataItem))] public void SetDate(IntCYYMMDDTheoryDataItem data) => Assert.Equal(data.Expected.Date, new IntCYYMMDD()
 {
     Date = data.Test.Date
 }.Date);