示例#1
0
        public GetDeviceBySerialExecutorTests()
        {
            var loggerFactory     = new LoggerFactory().AddSerilog(SerilogExtensions.Configure("VSS.Project.WebApi.log"));
            var serviceCollection = new ServiceCollection();

            serviceCollection.AddLogging();
            serviceCollection.AddSingleton(loggerFactory);
            serviceCollection
            .AddSingleton <IConfigurationStore, GenericConfiguration>()
            .AddTransient <IServiceExceptionHandler, ServiceExceptionHandler>()
            .AddTransient <IErrorCodesProvider, ProjectErrorCodesProvider>();

            ServiceProvider          = serviceCollection.BuildServiceProvider();
            _serviceExceptionHandler = ServiceProvider.GetRequiredService <IServiceExceptionHandler>();
            _configStore             = ServiceProvider.GetRequiredService <IConfigurationStore>();
            _logger = ServiceProvider.GetRequiredService <ILoggerFactory>();
            _serviceExceptionHandler = ServiceProvider.GetRequiredService <IServiceExceptionHandler>();
            _customHeaders           = new HeaderDictionary();

            _customerUid     = Guid.NewGuid().ToString();
            _deviceUid       = Guid.NewGuid().ToString();
            _deviceName      = "the Device Name";
            _serialNumber    = "67567576SN";
            _relationStatus  = RelationStatusEnum.Active;
            _tccDeviceStatus = TCCDeviceStatusEnum.Registered;
        }
示例#2
0
 public DeviceData(string customerUid, string deviceUid, string deviceName, string serialNumber, RelationStatusEnum relationStatus, TCCDeviceStatusEnum tccDeviceStatus, long?shortRaptorAssetId)
 {
     CustomerUID        = customerUid;
     DeviceUID          = deviceUid;
     DeviceName         = deviceName;
     SerialNumber       = serialNumber;
     RelationStatus     = relationStatus;
     TccDeviceStatus    = tccDeviceStatus;
     ShortRaptorAssetId = shortRaptorAssetId;
 }