Exemple #1
0
        public CommandTestBase()
        {
            _mediatorMock    = new Mock <IMediator>();
            _currentUserMock = new Mock <ICurrentUserService>();
            _userManagerMock = new Mock <IUserManager>();
            _dateTime        = new DateTime(3001, 1, 1);
            _dateTimeMock    = new Mock <IDateTime>();
            _dateTimeMock.Setup(m => m.Now).Returns(_dateTime);

            _context = ShowcaseContextFactory.Create(_currentUserMock.Object, _dateTimeMock.Object);
        }
Exemple #2
0
        public QueryTestFixture()
        {
            _dateTime     = new DateTime(3001, 1, 1);
            _dateTimeMock = new Mock <IDateTime>();
            _dateTimeMock.Setup(m => m.Now).Returns(_dateTime);

            Context = ShowcaseContextFactory.Create(_currentUserMock.Object, _dateTimeMock.Object);

            var configurationProvider = new MapperConfiguration(cfg =>
            {
                cfg.AddProfile <MappingProfile>();
            });

            Mapper = configurationProvider.CreateMapper();
        }