Exemplo n.º 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);
        }
Exemplo n.º 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();
        }
Exemplo n.º 3
0
 public void Dispose()
 {
     ShowcaseContextFactory.Destroy(Context);
 }