public CspSubscriptionsLicenseNumbersAligner(
     CspSubscriptions cspSubscriptions,
     CustomerLicensingMode customerLicensingMode)
 {
     this.cspSubscriptions = cspSubscriptions
                             ?? throw new ArgumentNullException(nameof(cspSubscriptions));
     this.customerLicensingMode = customerLicensingMode;
 }
Beispiel #2
0
        private IEnumerable <CspSubsctriptionAvailableLicenseNumberAlignmentResult> AlignNumberOfLicensesForSubscriptionsAffectedByUserDeletion(
            CustomerLicensingMode customerLicensingMode, CspSubscriptions customerCspSubscriptions, IEnumerable <SubscriptionCspId> userSubscriptionIds)
        {
            var cspSubscriptionsLicenseNumbersAligner = new CspSubscriptionsLicenseNumbersAligner(
                customerCspSubscriptions, customerLicensingMode);

            return(cspSubscriptionsLicenseNumbersAligner
                   .AlignLicenseNumbersForCspSubscriptionsWithIdsOf(userSubscriptionIds));
        }
 public Customer(
     CustomerNumber number,
     CustomerCspId cspId,
     CustomerLicensingMode licensingMode)
 {
     Number = number
              ?? throw new ArgumentNullException(nameof(number));
     CspId = cspId
             ?? throw new ArgumentNullException(nameof(cspId));
     LicensingMode = licensingMode;
 }
Beispiel #4
0
        public CustomersInformationStoreSimulator ReturnsCustomerWith(
            string cspId,
            CustomerLicensingMode licensingMode = CustomerLicensingMode.Automatic)
        {
            customersInformationStoreMock.Setup(customerInformationStore =>
                                                customerInformationStore.Get(new CustomerNumber(customerNumber)))
            .Returns(new Customer(
                         new CustomerNumber(customerNumber),
                         new CustomerCspId(cspId),
                         licensingMode));

            return(this);
        }