Exemplo n.º 1
0
        public void CheckMidnightIsCorrectlyDeserialisedToLocalTime()
        {
            var chosenHour = 0;
            var date       = new DateTime(2015, 09, 10, chosenHour, 30, 0, DateTimeKind.Local);

            DateTimeSerialisationMockingObject gesprek = DeserializeDateTimeSerialisationMockingObjectWithDateTimeProperty1(date);

            Assert.Equal(gesprek.DatetimeProperty1.TimeOfDay.Hours, chosenHour);
        }
Exemplo n.º 2
0
        public void CheckChosenHourIsCorrectlyDeserializedToLocalTime()
        {
            var chosenHour = 23;
            var date       = new DateTime(2015, 09, 10, chosenHour, 0, 0, DateTimeKind.Local);

            DateTimeSerialisationMockingObject dateTimeSerialisationMockingObject = DeserializeDateTimeSerialisationMockingObjectWithDateTimeProperty1(date);

            Assert.Equal(dateTimeSerialisationMockingObject.DatetimeProperty1.TimeOfDay.Hours, chosenHour);
        }