public void ThenICanNotExecuteProtectedAdminMethodsWithInsufficientPermissions() { LogWithNewUser(Modules.VipLevelManager, Permissions.View); const int statusCode = (int)HttpStatusCode.Forbidden; Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.SaveCountry(new EditCountryData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.DeleteCountry(new DeleteCountryData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.ActivateCulture(new ActivateCultureData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.DeactivateCulture(new DeactivateCultureData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.SaveCulture(new EditCultureData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.ActivateCurrency(new ActivateCurrencyData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.DeactivateCulture(new DeactivateCultureData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.SaveCurrency(new EditCurrencyData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.CreateUserInAdminManager(new AddAdminData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.UpdateUserInAdminManager(new EditAdminData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.ResetPasswordInAdminManager(new AddAdminData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.ActivateUserInAdminManager(new ActivateUserData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.DeactivateUserInAdminManager(new DeactivateUserData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.GetLicenseeDataInAdminManager(new GetLicenseeData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.CreateRoleInRoleManager(new AddRoleData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.UpdateRoleInRoleManager(new EditRoleData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.GetLicenseeDataInRoleManager(new List <Guid>())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.CreateSettingInIdentificationDocumentSettings(new IdentificationDocumentSettingsData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.UpdateSettingInIdentificationDocumentSettings(new IdentificationDocumentSettingsData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.CreateIpRegulationInAdminIpRegulations(new EditAdminIpRegulationData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.UpdateIpRegulationInAdminIpRegulations(new EditAdminIpRegulationData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.DeleteIpRegulationInAdminIpRegulations(new DeleteAdminIpRegulationData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.CreateIpRegulationInBrandIpRegulations(new AddBrandIpRegulationData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.UpdateIpRegulationInBrandIpRegulations(new RegoV2.Core.Common.Data.Admin.EditBrandIpRegulationData())).GetHttpCode(), Is.EqualTo(statusCode)); Assert.That(Assert.Throws <HttpException>(() => AdminApiProxy.DeleteIpRegulationInBrandIpRegulations(new DeleteBrandIpRegulationData())).GetHttpCode(), Is.EqualTo(statusCode)); }
public void ThenRequiredDataToAddNewPlayerIsVisibleToMe() { var result = AdminApiProxy.GetAddPlayerDataInPlayerManager(); result.Should().NotBeNull(); result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); }
public void ThenAvailableBrandsAreVisibleToMe() { var result = AdminApiProxy.GetUserBrands(); result.Should().NotBeNull(); result.Brands.Should().NotBeEmpty(); }
public void ThenNewBrandIsSuccessfullyAdded() { var licensee = BrandTestHelper.CreateLicensee(); var data = new AddBrandRequest() { Code = TestDataGenerator.GetRandomString(), InternalAccounts = 1, EnablePlayerPrefix = true, PlayerPrefix = TestDataGenerator.GetRandomString(3), Licensee = licensee.Id, Name = TestDataGenerator.GetRandomString(), PlayerActivationMethod = PlayerActivationMethod.Automatic, TimeZoneId = TestDataGenerator.GetRandomTimeZone().Id, Type = BrandType.Integrated, Email = TestDataGenerator.GetRandomEmail(), SmsNumber = TestDataGenerator.GetRandomPhoneNumber(useDashes: false), WebsiteUrl = TestDataGenerator.GetRandomWebsiteUrl() }; var result = AdminApiProxy.AddBrand(data); result.Should().NotBeNull(); result.Success.Should().BeTrue(); result.Data.Should().NotBeNull(); }
public void ThenNewUserIsSuccessfullyCreated() { ScenarioContext.Current.Should().ContainKey("brandId"); var brandId = ScenarioContext.Current.Get <Guid>("brandId"); ScenarioContext.Current.Should().ContainKey("licenseeId"); var licenseeId = ScenarioContext.Current.Get <Guid>("licenseeId"); var data = new AddAdminData { Username = TestDataGenerator.GetRandomString(), FirstName = "User", LastName = "123", Password = "******", Language = "English", IsActive = true, AssignedLicensees = new[] { licenseeId }, AllowedBrands = new[] { brandId }, Currencies = new[] { "CAD" }, RoleId = SecurityTestHelper.CreateRole().Id }; var result = AdminApiProxy.CreateUserInAdminManager(data); result.Should().NotBeNull(); result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); }
public void ThenPlayerDataIsSuccessfullyEdited() { ScenarioContext.Current.Should().ContainKey("playerId"); var playerId = ScenarioContext.Current.Get <Guid>("playerId"); var player = PlayerQueries.GetPlayer(playerId); var data = new EditPlayerData { PlayerId = player.Id, FirstName = player.FirstName, LastName = player.LastName, MailingAddressCity = TestDataGenerator.GetRandomString(), MailingAddressPostalCode = TestDataGenerator.GetRandomString(), CountryCode = player.CountryCode, Email = TestDataGenerator.GetRandomEmail(), DateOfBirth = "1980/01/01", MailingAddressLine1 = TestDataGenerator.GetRandomString(), PhoneNumber = player.PhoneNumber, PaymentLevelId = new Guid(), Title = (PlayerEnums.Title?)Title.Mr, Gender = (PlayerEnums.Gender?)Gender.Male, AccountAlertEmail = true, AccountAlertSms = true, MarketingAlertEmail = true, MarketingAlertPhone = true, MarketingAlertSms = true }; var result = AdminApiProxy.EditPlayerInfo(data); result.Should().NotBeNull(); result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); }
public void ThenNewIdentificationSettingsIsSuccessfullyCreated() { ScenarioContext.Current.Should().ContainKey("brandId"); var brandId = ScenarioContext.Current.Get <Guid>("brandId"); ScenarioContext.Current.Should().ContainKey("licenseeId"); var licenseeId = ScenarioContext.Current.Get <Guid>("licenseeId"); ScenarioContext.Current.Should().ContainKey("bankAccountId"); var bankAccountId = ScenarioContext.Current.Get <Guid>("bankAccountId"); var data = new IdentificationDocumentSettingsData { LicenseeId = licenseeId, BrandId = brandId, TransactionType = TransactionType.Deposit, PaymentGatewayBankAccountId = bankAccountId, PaymentGatewayMethod = PaymentMethod.OfflineBank, IdFront = true, IdBack = true, CreditCardFront = true, CreditCardBack = true, POA = true, DCF = true, Remark = TestDataGenerator.GetRandomString() }; var result = AdminApiProxy.CreateSettingInIdentificationDocumentSettings(data); result.Should().NotBeNull(); result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); }
public void ThenPlayerBankAccountIsSuccessfullyAdded() { ScenarioContext.Current.Should().ContainKey("playerId"); ScenarioContext.Current.Should().ContainKey("bankAccountId"); var playerId = ScenarioContext.Current.Get <Guid>("playerId"); var bankAccountId = ScenarioContext.Current.Get <Guid>("bankAccountId"); var data = new EditPlayerBankAccountData { Id = Guid.NewGuid(), PlayerId = playerId, Bank = bankAccountId, AccountName = TestDataGenerator.GetRandomString(), AccountNumber = TestDataGenerator.GetRandomString(10, "1234567890"), Province = TestDataGenerator.GetRandomString(), City = TestDataGenerator.GetRandomString(), Branch = TestDataGenerator.GetRandomString(), SwiftCode = TestDataGenerator.GetRandomString(), Address = TestDataGenerator.GetRandomString() }; var result = AdminApiProxy.SaveBankAccountInPlayerManager(data); result.Should().NotBeNull(); result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); }
public void ThenBrandIpRegulationIsSuccessfullyUpdated() { ScenarioContext.Current.Should().ContainKey("brandId"); var brandId = ScenarioContext.Current.Get <Guid>("brandId"); ScenarioContext.Current.Should().ContainKey("licenseeId"); var licenseeId = ScenarioContext.Current.Get <Guid>("licenseeId"); ScenarioContext.Current.Should().ContainKey("brandIpRegulationId"); var brandIpRegulationId = ScenarioContext.Current.Get <Guid>("brandIpRegulationId"); var data = new RegoV2.Core.Common.Data.Admin.EditBrandIpRegulationData { Id = brandIpRegulationId, IpAddress = TestDataGenerator.GetRandomIpAddress(), Description = TestDataGenerator.GetRandomString(), BrandId = brandId, LicenseeId = licenseeId }; var result = AdminApiProxy.UpdateIpRegulationInBrandIpRegulations(data); result.Should().NotBeNull(); result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); }
public void ThenNewContentTranslationIsSuccessfullyCreated() { var contentName = TestDataGenerator.GetRandomString(); var contentSource = TestDataGenerator.GetRandomString(); ScenarioContext.Current.Should().ContainKey("cultureCode"); var cultureCode = ScenarioContext.Current.Get <string>("cultureCode"); var translation = new AddContentTranslationData() { ContentName = contentName, ContentSource = contentSource, Language = cultureCode, Translation = TestDataGenerator.GetRandomString() }; var data = new AddContentTranslationModel() { Languages = new List <string>(), Translations = new[] { translation }, ContentName = contentName, ContentSource = contentSource }; var result = AdminApiProxy.CreateContentTranslation(data); result.Should().NotBeNull(); result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); }
public void ThenRequiredBrandDataIsVisibleToMe() { ScenarioContext.Current.Should().ContainKey("brandId"); var brandId = ScenarioContext.Current.Get <Guid>("brandId"); var result = AdminApiProxy.GetBrandViewData(brandId); result.Should().NotBeNull(); }
public void ThenSubmittedBrandIpAddressBatchIsUnique() { const string ipAddressBatch = "192.168.5.17-25"; var result = AdminApiProxy.IsIpAddressBatchUniqueInBrandIpRegulations(ipAddressBatch); result.Should().NotBeNull(); result.Should().BeEquivalentTo("true"); }
public void ThenIAmForbiddenGetBrandCurrencyAssignData() { ScenarioContext.Current.Should().ContainKey("brandId"); var brandId = ScenarioContext.Current.Get <Guid>("brandId"); var ex = Assert.Throws <HttpException>(() => AdminApiProxy.GetBrandCurrencyAssignData(brandId)); Assert.That(ex.GetHttpCode(), Is.EqualTo((int)HttpStatusCode.Forbidden)); }
public void ThenSubmittedBrandIpAddressIsUnique() { var ipAddress = TestDataGenerator.GetRandomIpAddress(); var result = AdminApiProxy.IsIpAddressUniqueInBrandIpRegulations(ipAddress); result.Should().NotBeNull(); result.Should().BeEquivalentTo("true"); }
public void ThenBrandProductAssignDataIsVisibleToMe() { ScenarioContext.Current.Should().ContainKey("brandId"); var brandId = ScenarioContext.Current.Get <Guid>("brandId"); var result = AdminApiProxy.GetBrandProductAssignData(brandId); result.Should().NotBeNull(); result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); }
public void ThenIdentificationDocumentSettingsLicenseeBrandsDataIsVisibleToMe() { ScenarioContext.Current.Should().ContainKey("licenseeId"); var licenseeId = ScenarioContext.Current.Get <Guid>("licenseeId"); var result = AdminApiProxy.GetLicenseeBrandsInIdentificationDocumentSettings(licenseeId); result.Should().NotBeNull(); result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); }
public void ThenIdentificationDocumentEditDataIsVisibleToMe() { ScenarioContext.Current.Should().ContainKey("playerId"); var playerId = ScenarioContext.Current.Get <Guid>("playerId"); var result = AdminApiProxy.GetIdentificationDocumentEditDataInPlayerInfo(playerId); result.Should().NotBeNull(); result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); }
public void ThenRoleManagerLicenseeDataIsVisibleToMe() { ScenarioContext.Current.Should().ContainKey("licenseeId"); var licenseeId = ScenarioContext.Current.Get <Guid>("licenseeId"); var result = AdminApiProxy.GetLicenseeDataInRoleManager(new[] { licenseeId }); result.Should().NotBeNull(); result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); }
public void ThenRoleIsVisibleToMe() { ScenarioContext.Current.Should().ContainKey("roleId"); var roleId = ScenarioContext.Current.Get <Guid>("roleId"); var result = AdminApiProxy.GetRoleInRoleManager(roleId); result.Should().NotBeNull(); result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); }
public void ThenUserEditDataIsVisibleToMe() { ScenarioContext.Current.Should().ContainKey("userId"); var userId = ScenarioContext.Current.Get <Guid>("userId"); var result = AdminApiProxy.GetUserEditDataInAdminManager(userId); result.Should().NotBeNull(); result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); }
public void ThenRequiredDataToAddNewBrandIsVisibleToMe() { var result = AdminApiProxy.GetBrandAddData(); result.Should().NotBeNull(); result.Licensees.Should().NotBeEmpty(); result.Types.Should().NotBeEmpty(); result.TimeZones.Should().NotBeEmpty(); result.PlayerActivationMethods.Should().NotBeEmpty(); }
public void ThenCurrencyByCodeIsVisibleToMe() { ScenarioContext.Current.Should().ContainKey("currencyCode"); var currencyCode = ScenarioContext.Current.Get <string>("currencyCode"); var result = AdminApiProxy.GetCurrencyByCode(currencyCode); result.Should().NotBeNull(); result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); }
public void ThenCurrentBankAccountForPlayerIsVisibleToMe() { ScenarioContext.Current.Should().ContainKey("playerId"); var playerId = ScenarioContext.Current.Get <Guid>("playerId"); var result = AdminApiProxy.GetCurrentBankAccountInPlayerManager(playerId); result.Should().NotBeNull(); result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); }
public void ThenBrandsAreVisibleToMe() { ScenarioContext.Current.Should().ContainKey("licenseeId"); var licenseeId = ScenarioContext.Current.Get <Guid>("licenseeId"); var result = AdminApiProxy.GetBrands(false, new[] { licenseeId }); result.Should().NotBeNull(); result.Brands.Should().NotBeEmpty(); }
public void ThenLicenseeBrandsAreVisibleToMe() { ScenarioContext.Current.Should().ContainKey("licenseeId"); var licenseeId = ScenarioContext.Current.Get <Guid>("licenseeId"); var result = AdminApiProxy.GetLicenseeBrandsInBrandIpRegulations(licenseeId, false); result.Should().NotBeNull(); result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); }
public void ThenBrandCurrenciesWithNamesAreVisibleToMe() { ScenarioContext.Current.Should().ContainKey("brandId"); var brandId = ScenarioContext.Current.Get <Guid>("brandId"); var result = AdminApiProxy.GetBrandCurrenciesWithNames(brandId); result.Should().NotBeNull(); result.CurrencyCodes.Should().NotBeNullOrEmpty(); }
public void ThenBrandIpRegulationEditDataIsVisibleToMe() { ScenarioContext.Current.Should().ContainKey("brandIpRegulationId"); var brandIpRegulationId = ScenarioContext.Current.Get <Guid>("brandIpRegulationId"); var result = AdminApiProxy.GetEditDataInBrandIpRegulations(brandIpRegulationId); result.Should().NotBeNull(); result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); }
public void ThenRequiredDataToAddPlayerBrandDataIsVisibleToMe() { ScenarioContext.Current.Should().ContainKey("brandId"); var brandId = ScenarioContext.Current.Get <Guid>("brandId"); var result = AdminApiProxy.GetAddPlayerBrandDataInPlayerManager(brandId); result.Should().NotBeNull(); result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); }
public void ThenBrandProductBetLevelsAreVisibleToMe() { var licensee = BrandTestHelper.CreateLicensee(); var brand = BrandTestHelper.CreateBrand(licensee, isActive: true); var result = AdminApiProxy.GetBrandProductBetLevels(brand.Id, brand.Products.First().ProductId); result.Should().NotBeNull(); result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); }
public void ThenVipLevelsAreVisibleToMe() { ScenarioContext.Current.Should().ContainKey("brandId"); var brandId = ScenarioContext.Current.Get <Guid>("brandId"); var result = AdminApiProxy.GetVipLevelsInPlayerManager(brandId); result.Should().NotBeNull(); result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); }