示例#1
0
        public void WhenDeviceAssetAssociationRequestIsSetupFor(string associationType)
        {
            if (associationType == "CustomerWithSameDealer")
            {
                AssetServiceSteps.assetServiceSupport.CreateAssetModel = AssetServiceSteps.GetDefaultValidAssetServiceCreateRequest();
                if (oldCustomerUID != Guid.Empty)
                {
                    AssetServiceSteps.assetServiceSupport.CreateAssetModel.OwningCustomerUID = oldCustomerUID;
                }
                AssetServiceSteps.assetServiceSupport.PostValidCreateRequestToService();
                assetUID    = AssetServiceSteps.assetServiceSupport.CreateAssetModel.AssetUID;
                oldAssetUID = assetUID;
                AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.CreateDeviceModel = AssetDeviceSearchServiceSteps.GetDefaultValidDeviceServiceCreateRequest();
                AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.PostValidCreateRequestToService();
                deviceUID = AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.CreateDeviceModel.DeviceUID;
                AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.DeviceAssetAssociationModel = AssetDeviceSearchServiceSteps.GetDefaultValidDeviceAssetAssociationServiceRequest();

                AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.PostValidDeviceAssetAssociationRequestToService();

                assetDetailsServiceSupport.FirstAssetModel.AssetName    = AssetServiceSteps.assetServiceSupport.CreateAssetModel.AssetName;
                assetDetailsServiceSupport.FirstAssetModel.SerialNumber = AssetServiceSteps.assetServiceSupport.CreateAssetModel.SerialNumber;
                assetDetailsServiceSupport.FirstAssetModel.MakeCode     = AssetServiceSteps.assetServiceSupport.CreateAssetModel.MakeCode;
                assetDetailsServiceSupport.FirstAssetModel.Model        = AssetServiceSteps.assetServiceSupport.CreateAssetModel.Model;
                assetDetailsServiceSupport.FirstAssetModel.AssetType    = AssetServiceSteps.assetServiceSupport.CreateAssetModel.AssetType;
                assetDetailsServiceSupport.FirstAssetModel.ModelYear    = AssetServiceSteps.assetServiceSupport.CreateAssetModel.ModelYear;
                assetDetailsServiceSupport.FirstAssetModel.AssetUID     = AssetServiceSteps.assetServiceSupport.CreateAssetModel.AssetUID;


                assetDetailsServiceSupport.FirstDeviceModel.DeviceSerialNumber = AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.CreateDeviceModel.DeviceSerialNumber;
                assetDetailsServiceSupport.FirstDeviceModel.DeviceType         = AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.CreateDeviceModel.DeviceType;
                assetDetailsServiceSupport.FirstDeviceModel.DeviceState        = AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.CreateDeviceModel.DeviceState;
                assetDetailsServiceSupport.FirstDeviceModel.DeviceUID          = AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.CreateDeviceModel.DeviceUID;

                AssetServiceSteps.assetServiceSupport.CreateAssetModel = AssetServiceSteps.GetDefaultValidAssetServiceCreateRequest();
                if (customerUID != Guid.Empty)
                {
                    AssetServiceSteps.assetServiceSupport.CreateAssetModel.OwningCustomerUID = customerUID;
                }
                AssetServiceSteps.assetServiceSupport.PostValidCreateRequestToService();
                assetUID = AssetServiceSteps.assetServiceSupport.CreateAssetModel.AssetUID;
                AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.CreateDeviceModel = AssetDeviceSearchServiceSteps.GetDefaultValidDeviceServiceCreateRequest();
                AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.PostValidCreateRequestToService();
                deviceUID = AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.CreateDeviceModel.DeviceUID;
                AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.DeviceAssetAssociationModel = AssetDeviceSearchServiceSteps.GetDefaultValidDeviceAssetAssociationServiceRequest();
            }
            else
            {
                AssetServiceSteps.assetServiceSupport.CreateAssetModel = AssetServiceSteps.GetDefaultValidAssetServiceCreateRequest();
                if (customerUID != Guid.Empty)
                {
                    AssetServiceSteps.assetServiceSupport.CreateAssetModel.OwningCustomerUID = customerUID;
                }
                AssetServiceSteps.assetServiceSupport.PostValidCreateRequestToService();
                assetUID = AssetServiceSteps.assetServiceSupport.CreateAssetModel.AssetUID;
                AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.CreateDeviceModel = AssetDeviceSearchServiceSteps.GetDefaultValidDeviceServiceCreateRequest();
                AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.PostValidCreateRequestToService();
                deviceUID = AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.CreateDeviceModel.DeviceUID;
                AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.DeviceAssetAssociationModel = AssetDeviceSearchServiceSteps.GetDefaultValidDeviceAssetAssociationServiceRequest();
            }
        }
示例#2
0
 public void GivenAssetDeviceAssociationRequestIsSetupWithDefaultValues()
 {
     AssetServiceSteps.assetServiceSupport.CreateAssetModel = AssetServiceSteps.GetDefaultValidAssetServiceCreateRequest();
     AssetServiceSteps.assetServiceSupport.PostValidCreateRequestToService();
     assetDeviceSearchServiceSupport.CreateDeviceModel = GetDefaultValidDeviceServiceCreateRequest();
     assetDeviceSearchServiceSupport.PostValidCreateRequestToService();
     assetDeviceSearchServiceSupport.DeviceAssetAssociationModel = GetDefaultValidDeviceAssetAssociationServiceRequest();
 }
示例#3
0
 public void GivenDeviceAssetAssociationRequestIsSetupWithDefaultValues()
 {
     AssetServiceSteps.assetServiceSupport.CreateAssetModel = AssetServiceSteps.GetDefaultValidAssetServiceCreateRequest();
     if (customerUID != Guid.Empty)
     {
         AssetServiceSteps.assetServiceSupport.CreateAssetModel.OwningCustomerUID = customerUID;
     }
     AssetServiceSteps.assetServiceSupport.PostValidCreateRequestToService();
     assetUID = AssetServiceSteps.assetServiceSupport.CreateAssetModel.AssetUID;
     AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.CreateDeviceModel = AssetDeviceSearchServiceSteps.GetDefaultValidDeviceServiceCreateRequest();
     AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.PostValidCreateRequestToService();
     deviceUID = AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.CreateDeviceModel.DeviceUID;
     AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.DeviceAssetAssociationModel = AssetDeviceSearchServiceSteps.GetDefaultValidDeviceAssetAssociationServiceRequest();
 }
示例#4
0
        public void WhenDeviceAssetAssociationRequestIsSetupForAssetAndDeviceVerification()
        {
            //first asset
            AssetServiceSteps.assetServiceSupport.CreateAssetModel = AssetServiceSteps.GetDefaultValidAssetServiceCreateRequest();
            if (assetDetailsServiceSupport.FirstCustomerModel.CustomerUID != Guid.Empty)
            {
                AssetServiceSteps.assetServiceSupport.CreateAssetModel.OwningCustomerUID = assetDetailsServiceSupport.FirstCustomerModel.CustomerUID;
            }
            AssetServiceSteps.assetServiceSupport.PostValidCreateRequestToService();
            assetUID    = AssetServiceSteps.assetServiceSupport.CreateAssetModel.AssetUID;
            oldAssetUID = assetUID;
            //first device
            AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.CreateDeviceModel = AssetDeviceSearchServiceSteps.GetDefaultValidDeviceServiceCreateRequest();
            AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.PostValidCreateRequestToService();
            deviceUID = AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.CreateDeviceModel.DeviceUID;
            //first device asset association
            AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.DeviceAssetAssociationModel = AssetDeviceSearchServiceSteps.GetDefaultValidDeviceAssetAssociationServiceRequest();
            AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.PostValidDeviceAssetAssociationRequestToService();

            assetDetailsServiceSupport.FirstAssetModel.AssetName    = AssetServiceSteps.assetServiceSupport.CreateAssetModel.AssetName;
            assetDetailsServiceSupport.FirstAssetModel.SerialNumber = AssetServiceSteps.assetServiceSupport.CreateAssetModel.SerialNumber;
            assetDetailsServiceSupport.FirstAssetModel.MakeCode     = AssetServiceSteps.assetServiceSupport.CreateAssetModel.MakeCode;
            assetDetailsServiceSupport.FirstAssetModel.Model        = AssetServiceSteps.assetServiceSupport.CreateAssetModel.Model;
            assetDetailsServiceSupport.FirstAssetModel.AssetType    = AssetServiceSteps.assetServiceSupport.CreateAssetModel.AssetType;
            assetDetailsServiceSupport.FirstAssetModel.ModelYear    = AssetServiceSteps.assetServiceSupport.CreateAssetModel.ModelYear;
            assetDetailsServiceSupport.FirstAssetModel.AssetUID     = AssetServiceSteps.assetServiceSupport.CreateAssetModel.AssetUID;


            assetDetailsServiceSupport.FirstDeviceModel.DeviceSerialNumber = AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.CreateDeviceModel.DeviceSerialNumber;
            assetDetailsServiceSupport.FirstDeviceModel.DeviceType         = AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.CreateDeviceModel.DeviceType;
            assetDetailsServiceSupport.FirstDeviceModel.DeviceState        = AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.CreateDeviceModel.DeviceState;
            assetDetailsServiceSupport.FirstDeviceModel.DeviceUID          = AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.CreateDeviceModel.DeviceUID;

            //second asset
            AssetServiceSteps.assetServiceSupport.CreateAssetModel = AssetServiceSteps.GetDefaultValidAssetServiceCreateRequest();
            if (customerUID != Guid.Empty)
            {
                AssetServiceSteps.assetServiceSupport.CreateAssetModel.OwningCustomerUID = customerUID;
            }
            AssetServiceSteps.assetServiceSupport.PostValidCreateRequestToService();
            assetUID = AssetServiceSteps.assetServiceSupport.CreateAssetModel.AssetUID;
            //second device
            AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.CreateDeviceModel = AssetDeviceSearchServiceSteps.GetDefaultValidDeviceServiceCreateRequest();
            AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.PostValidCreateRequestToService();
            deviceUID = AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.CreateDeviceModel.DeviceUID;
            //second device asset association
            AssetDeviceSearchServiceSteps.assetDeviceSearchServiceSupport.DeviceAssetAssociationModel = AssetDeviceSearchServiceSteps.GetDefaultValidDeviceAssetAssociationServiceRequest();
        }