Example #1
0
        // !!! This is a partial class! All the actual tests and member variables and setup methods are in a separate file,
        // for ease of navigation.

        private void CreateRequestViaController(
            int requestLengthInMinutes,
            DateTime startTime,
            String userId)
        {
            var timeRequest = new TimeRequestModelBuilder()
                              .WithLengthInMinutes(requestLengthInMinutes)
                              .WithUserId(userId)
                              .Model();

            _testClock.SetDateTime(startTime);
            _controller.Create(timeRequest);
        }
Example #2
0
        private void CreateRequestInternally(
            int requestLengthInMinutes,
            DateTime startTime,
            String userId,
            bool alerted)
        {
            var timeRequest = new TimeRequestModelBuilder()
                              .WithLengthInMinutes(requestLengthInMinutes)
                              .WithRequestTimeStamp(startTime)
                              .WithUserId(userId)
                              .WithAlerted(alerted)
                              .Model();

            _testClock.SetDateTime(startTime);
            _timeRequestData.AddTimeRequest(_dbDummyContext, timeRequest);
        }