Exemplo n.º 1
0
        public async Task RegisterUserToAccount__ReturnsTrue()
        {
            Guid id = await CreateAccount();

            await RegisterUserToAccount(id);

            EnderUserAccountRequest account = await GetAccount(id);

            Assert.Single(account.Users);
        }
Exemplo n.º 2
0
        public async Task CreateAccount__ReturnsAccount()
        {
            var  request = GetCreateAccountRequest();
            Guid id      = await CreateAccount(request);

            EnderUserAccountRequest account = await GetAccount(id);

            Assert.Equal(request.Plan, account.CurrentPlan);
            Assert.Empty(account.Users);
        }
Exemplo n.º 3
0
        public async Task UpgradePlan__ReturnsAccountWithNewPlan()
        {
            Guid id = await CreateAccount();

            var request = new UpgradePlanRequest()
            {
                Plan = Plan.Enterprise
            };

            await UpgradePlan(id, request);

            EnderUserAccountRequest account = await GetAccount(id);

            Assert.Equal(request.Plan, account.CurrentPlan);
        }