public TestingDatabase()
        {
            _connection = new SqliteConnection("Filename=:memory:");
            _connection.Open();

            _db = new SMModelersContext(
                new DbContextOptionsBuilder <SMModelersContext>()
                .UseSqlite(_connection)
                .Options);

            _db.Database.EnsureCreated();

            _comment = new PostCommentManager(_db);

            _image = new PostImageManager(_db, _cloudImage, _s3Provider);

            _post = new UserPostManager(_db, _comment, _image);
        }
Exemplo n.º 2
0
 public UserPostManager(SMModelersContext context, IPostComment postComment, IPostImage postImage)
 {
     _context     = context;
     _postComment = postComment;
     _postImage   = postImage;
 }
Exemplo n.º 3
0
 public PostImageController(IPostImage postImage, UserManager <ApplicationUser> userManager)
 {
     _postImage   = postImage;
     _userManager = userManager;
 }