Esempio n. 1
0
        public static EventCreationRequest CreateCreationRequest(Car owner = null, int mileage = 1000, DateTime?date = null)
        {
            owner ??= VehiclesTestData.CreateCar();

            date ??= DateTime.Now;

            return(EventCreationRequest.CreateValid(owner, mileage, date.Value));
        }
Esempio n. 2
0
        public static DiaryItem CreateDiaryItem(Car car = null, int mileage = 1000, DateTime?timestamp = null)
        {
            car ??= VehiclesTestData.CreateCar();
            timestamp ??= DateTime.Now;
            var valid = new DiaryItem(car, mileage, timestamp.Value);

            /* do magic here with reflection to modify object however you want */

            return(valid);
        }