Beispiel #1
0
        public void FolderNameNotNull_DiskSpaceCreate_SaveOk()
        {
            //Arrange
            sTaaSSoap.STaaSPlatformApi = _sTaaSPlatformApi;

            //Act
            sTaaSSoap.DiskSpaceCreate("klocna");

            //Assert
            Assert.IsInstanceOfType(sTaaSSoap, typeof(ISTaaSSoap));
        }
Beispiel #2
0
        public override void DoJob(dynamic data)
        {
            var operationGuid = string.Empty;

            try
            {
                CreateDiskSpaceData json = JsonConvert.DeserializeObject <CreateDiskSpaceData>(data);
                operationGuid = json.OrderDemandGuid;

                var folderGuid = new Guid(operationGuid);
                _sTaaSSoap.DiskSpaceCreate(folderGuid.ToString("N"));
                _diskSpaceRepository.CreateDiskSpace(json.ProductId, json.UserId, (byte?)DiskSpaceState.Active, json.DiskName, json.Description, folderGuid, new Guid(json.AssetGroupId));

                _orderDemandRepository.ChangeOrderDemandState(operationGuid, (int)OrderDemandStates.Finished);

                SendNotification(json);
            }

            catch (Exception ex)
            {
                _orderDemandRepository.ChangeOrderDemandState(operationGuid, (int)OrderDemandStates.FinishedError);
                _logRepository.InsertLogoRecord(nameof(CreateDiskSpace), nameof(LogLevel.Error), ex.Message + " " + ex.StackTrace, operationGuid, data);
            }
        }