/// <summary>
        /// Define base tests fixture.
        /// </summary>
        public BaseTestsFixture()
        {
            Context = ApplicationContextFactory.Create();

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

            Mapper = configurationProvider.CreateMapper();
        }
示例#2
0
        /// <summary>
        /// Define base tests fixture.
        /// </summary>
        public BaseTestsFixture()
        {
            Context = ApplicationContextFactory.Create();

            var configurationProvider = new MapperConfiguration(cfg =>
            {
                cfg.AddProfile <AuthorProfile>();
                cfg.AddProfile <TopicProfile>();
                cfg.AddProfile <PostProfile>();
                cfg.AddProfile <CommentProfile>();
            });

            Mapper = configurationProvider.CreateMapper();
        }
 /// <summary>
 /// Разрушить контекст.
 /// </summary>
 public void Dispose()
 {
     ApplicationContextFactory.Destroy(Context);
 }