Ejemplo n.º 1
0
 public IDMAppServiceTest()
 {
     _moqIDMQueries             = new Mock <IIDMQueries>();
     _moqCommandService         = new Mock <ICommandService>();
     _moqIdmProxy               = new Mock <IIDMProxy>();
     _moqMapper                 = new Mock <IMapper>();
     _moqHttpContextAccessor    = new Mock <IHttpContextAccessor>();
     _moqNotificationAppService = new Mock <INotificationAppService>();
     _moqNotificationQueries    = new Mock <INotificationQueries>();
     _sut = new IDMAppService(_moqIdmProxy.Object, _moqIDMQueries.Object, _moqMapper.Object, _moqCommandService.Object, _moqHttpContextAccessor.Object,
                              _moqNotificationQueries.Object, _moqNotificationAppService.Object, InitialData.context);
 }
Ejemplo n.º 2
0
        public IDMAppServiceTest()
        {
            var db = new DbContextOptionsBuilder <AppDbContext>()
                     .UseInMemoryDatabase(databaseName: "TestingDB")
                     .Options;

            _httpContext                = new Mock <IHttpContextAccessor>();
            _moqAppDbContext            = new AppDbContext(db, _httpContext.Object);
            _rootConfigurationMock      = new Mock <IOptionsSnapshot <RootConfigurations> >();
            _moqCommandRepository       = new Mock <IGenericCommandRepository>();
            _notificationAppServiceMock = new Mock <INotificationAppService>();
            _moqiDMProxy                = new Mock <IIDMProxy>();
            _mapper                 = new Mock <IMapper>();
            _moqCommandService      = new Mock <ICommandService>();
            _moqNotificationQueries = new Mock <INotificationQueries>();
            _moqiDMQueries          = new Mock <IIDMQueries>();
            _iDMAppService          = new IDMAppService(_moqiDMProxy.Object, _moqiDMQueries.Object, _mapper.Object, _moqCommandService.Object, _httpContext.Object, _moqNotificationQueries.Object, _notificationAppServiceMock.Object, null);
        }