Exemple #1
0
 public void Initialize()
 {
     _deviceRepositoryMock   = DeviceRepositoryMock.GetDeviceRepositoryMock();
     _incidentRepositoryMock = IncidentRepositoryMock.GetIncidentRepositoryMock();
     _deviceManipulation     = new DeviceManipulation(
         _deviceRepositoryMock.Object,
         _incidentRepositoryMock.Object
         );
     _incidentRepositoryMock.Setup(x => x.GetAllIncidents(1)).Returns(GetListOfValidIncidentDomains());
 }
Exemple #2
0
 public void Initialize()
 {
     _IncidentRepositoryMock           = IncidentRepositoryMock.GetIncidentRepositoryMock();
     _IncidentSettlementRepositoryMock = IncidentSettlementRepositoryMock.GetIncidentSettlementRepositoryMock();
     _IncidentWorkOrderRepositoryMock  = IncidentWorkOrderRepositoryMock.GetIncidentWorkOrderRepositoryMock();
     _NotificationRepositoryMock       = NotificationRepositoryMock.GetNotificationRepositoryMock();
     _TenantRepositoryMock             = TenantRepositoryMock.GetTenantRepositoryMock();
     _IncidentManipulation             = new IncidentManipulation(
         _IncidentRepositoryMock.Object,
         _IncidentSettlementRepositoryMock.Object,
         _IncidentWorkOrderRepositoryMock.Object,
         _NotificationRepositoryMock.Object,
         _TenantRepositoryMock.Object
         );
 }
Exemple #3
0
        public void Initialize()
        {
            // Queue setup
            var busControl = Bus.Factory.CreateUsingRabbitMq(cfg =>
            {
                var host = cfg.Host(new Uri(ConfigurationManager.AppSettings["rabbitMQHostUri"].ToString()), h =>
                {
                    h.Username(ConfigurationManager.AppSettings["rabbitMQUsername"].ToString());
                    h.Password(ConfigurationManager.AppSettings["rabbitMQPassword"].ToString());
                });

                // Define message queues and bind consumers to queue here
                cfg.ReceiveEndpoint(host, "message_log_queue", e =>
                {
                    e.Consumer <LogMessageReceivedConsumer>();
                });

                cfg.ReceiveEndpoint(host, "device_ping_queue", e =>
                {
                    e.Consumer <DevicePingReceivedConsumer>();
                });
            });

            _devicePingRepositoryMock = DevicePingRepositoryMock.GetDevicePingRepositoryMock();
            _deviceRepositoryMock     = DeviceRepositoryMock.GetDeviceRepositoryMock();
            _incidentRepositoryMock   = IncidentRepositoryMock.GetIncidentRepositoryMock();

            _deviceManipulation = new DeviceManipulation(
                _deviceRepositoryMock.Object,
                _incidentRepositoryMock.Object
                );

            _devicePingManipulation = new DevicePingManipulation(
                _devicePingRepositoryMock.Object,
                _deviceManipulation,
                busControl
                );
        }