/// <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);
 }