Browse Source

Field renamed to be consistent with Type Name

pull/65/head
Sebastian Stehle 9 years ago
parent
commit
cb90c4cf75
  1. 12
      tests/Squidex.Write.Tests/Apps/AppCommandHandlerTests.cs

12
tests/Squidex.Write.Tests/Apps/AppCommandHandlerTests.cs

@ -30,7 +30,7 @@ namespace Squidex.Write.Apps
{ {
private readonly Mock<ClientKeyGenerator> keyGenerator = new Mock<ClientKeyGenerator>(); private readonly Mock<ClientKeyGenerator> keyGenerator = new Mock<ClientKeyGenerator>();
private readonly Mock<IAppRepository> appRepository = new Mock<IAppRepository>(); private readonly Mock<IAppRepository> appRepository = new Mock<IAppRepository>();
private readonly Mock<IAppPlansProvider> appLimitsProvider = new Mock<IAppPlansProvider>(); private readonly Mock<IAppPlansProvider> appPlansProvider = new Mock<IAppPlansProvider>();
private readonly Mock<IAppPlanBillingManager> appPlansBillingManager = new Mock<IAppPlanBillingManager>(); private readonly Mock<IAppPlanBillingManager> appPlansBillingManager = new Mock<IAppPlanBillingManager>();
private readonly Mock<IUserResolver> userResolver = new Mock<IUserResolver>(); private readonly Mock<IUserResolver> userResolver = new Mock<IUserResolver>();
private readonly AppCommandHandler sut; private readonly AppCommandHandler sut;
@ -44,7 +44,7 @@ namespace Squidex.Write.Apps
{ {
app = new AppDomainObject(AppId, -1); app = new AppDomainObject(AppId, -1);
sut = new AppCommandHandler(Handler, appRepository.Object, appLimitsProvider.Object, appPlansBillingManager.Object, userResolver.Object, keyGenerator.Object); sut = new AppCommandHandler(Handler, appRepository.Object, appPlansProvider.Object, appPlansBillingManager.Object, userResolver.Object, keyGenerator.Object);
} }
[Fact] [Fact]
@ -99,7 +99,7 @@ namespace Squidex.Write.Apps
[Fact] [Fact]
public async Task AssignContributor_throw_exception_if_reached_max_contributor_size() public async Task AssignContributor_throw_exception_if_reached_max_contributor_size()
{ {
appLimitsProvider.Setup(x => x.GetPlan(null)).Returns(new ConfigAppLimitsPlan { MaxContributors = 2 }); appPlansProvider.Setup(x => x.GetPlan(null)).Returns(new ConfigAppLimitsPlan { MaxContributors = 2 });
CreateApp() CreateApp()
.AssignContributor(CreateCommand(new AssignContributor { ContributorId = "1" })) .AssignContributor(CreateCommand(new AssignContributor { ContributorId = "1" }))
@ -133,7 +133,7 @@ namespace Squidex.Write.Apps
[Fact] [Fact]
public async Task AssignContributor_should_assign_if_user_found() public async Task AssignContributor_should_assign_if_user_found()
{ {
appLimitsProvider.Setup(x => x.GetPlan(null)).Returns(new ConfigAppLimitsPlan { MaxContributors = -1 }); appPlansProvider.Setup(x => x.GetPlan(null)).Returns(new ConfigAppLimitsPlan { MaxContributors = -1 });
CreateApp(); CreateApp();
@ -185,7 +185,7 @@ namespace Squidex.Write.Apps
[Fact] [Fact]
public async Task ChangePlan_should_throw_if_plan_not_found() public async Task ChangePlan_should_throw_if_plan_not_found()
{ {
appLimitsProvider.Setup(x => x.IsConfiguredPlan("my-plan")).Returns(false); appPlansProvider.Setup(x => x.IsConfiguredPlan("my-plan")).Returns(false);
CreateApp() CreateApp()
.AttachClient(CreateCommand(new AttachClient { Id = clientName }), clientSecret); .AttachClient(CreateCommand(new AttachClient { Id = clientName }), clientSecret);
@ -201,7 +201,7 @@ namespace Squidex.Write.Apps
[Fact] [Fact]
public async Task ChangePlan_should_update_domain_object() public async Task ChangePlan_should_update_domain_object()
{ {
appLimitsProvider.Setup(x => x.IsConfiguredPlan("my-plan")).Returns(true); appPlansProvider.Setup(x => x.IsConfiguredPlan("my-plan")).Returns(true);
CreateApp() CreateApp()
.AttachClient(CreateCommand(new AttachClient { Id = clientName }), clientSecret); .AttachClient(CreateCommand(new AttachClient { Id = clientName }), clientSecret);

Loading…
Cancel
Save