Example #1
0
        public void Cannot_Activate_Brand_Without_Country()
        {
            var licensee = BrandHelper.CreateLicensee();
            var brandId  = BrandHelper.CreateBrand(licensee, PlayerActivationMethod.Automatic);

            BrandHelper.AssignCurrency(brandId, Currency.Code);
            BrandHelper.AssignCulture(brandId, Culture.Code);
            PaymentHelper.CreateBank(brandId, Country.Code);
            PaymentHelper.CreateBankAccount(brandId, Currency.Code);
            PaymentHelper.CreatePaymentLevel(brandId, Currency.Code);
            BrandHelper.CreateWallet(licensee.Id, brandId);
            BrandHelper.CreateVipLevel(brandId);

            Action action = () => BrandCommands.ActivateBrand(new ActivateBrandRequest {
                BrandId = brandId, Remarks = "remarks"
            });

            action.ShouldThrow <ValidationException>()
            .Where(x => x.Message.Contains("noAssignedCountry"));
        }