public DeviceConnectionActorTest() { this.logger = new Mock <ILogger>(); this.actorLogger = new Mock <IActorsLogger>(); this.rateLimitingConfig = new Mock <IRateLimitingConfig>(); this.scriptInterpreter = new Mock <IScriptInterpreter>(); this.devices = new Mock <IDevices>(); this.rateLimiting = new Mock <IRateLimiting>(); this.fetchLogic = new Mock <Fetch>( this.devices.Object, this.logger.Object); this.registerLogic = new Mock <Register>( this.devices.Object, this.logger.Object); this.connectLogic = new Mock <Connect>( this.devices.Object, this.scriptInterpreter.Object, this.logger.Object); this.deviceStateActor = new Mock <IDeviceStateActor>(); this.loopSettings = new Mock <ConnectionLoopSettings>( this.rateLimitingConfig.Object); this.rateLimitingConfig.Setup(x => x.DeviceMessagesPerSecond).Returns(10); this.target = new DeviceConnectionActor( this.logger.Object, this.actorLogger.Object, this.rateLimiting.Object, this.fetchLogic.Object, this.registerLogic.Object, this.connectLogic.Object); }
public DeviceConnectionActorTest() { this.logger = new Mock <ILogger>(); this.actorLogger = new Mock <IActorsLogger>(); this.rateLimitingConfig = new Mock <IRateLimitingConfig>(); this.scriptInterpreter = new Mock <IScriptInterpreter>(); this.devices = new Mock <IDevices>(); this.storageAdapterClient = new Mock <IStorageAdapterClient>(); this.rateLimiting = new Mock <IRateLimiting>(); this.credentialsSetupLogic = new Mock <CredentialsSetup>( this.devices.Object, this.logger.Object); this.fetchLogic = new Mock <FetchFromRegistry>( this.devices.Object, this.logger.Object); this.registerLogic = new Mock <Register>( this.devices.Object, this.logger.Object); this.connectLogic = new Mock <Connect>( this.devices.Object, this.scriptInterpreter.Object, this.logger.Object); this.deregisterLogic = new Mock <Deregister>( this.devices.Object, this.logger.Object); this.disconnectLogic = new Mock <Disconnect>( this.devices.Object, this.scriptInterpreter.Object, this.logger.Object); this.deviceStateActor = new Mock <IDeviceStateActor>(); this.loopSettings = new Mock <ConnectionLoopSettings>( this.rateLimitingConfig.Object); this.mockInstance = new Mock <IInstance>(); this.rateLimitingConfig.Setup(x => x.DeviceMessagesPerSecond).Returns(10); this.target = new DeviceConnectionActor( this.logger.Object, this.actorLogger.Object, this.rateLimiting.Object, this.credentialsSetupLogic.Object, this.fetchLogic.Object, this.registerLogic.Object, this.connectLogic.Object, this.deregisterLogic.Object, this.disconnectLogic.Object); }