Beispiel #1
0
        public async Task <IdentityResult> CreateAsync(UserEntity user, CancellationToken cancellationToken)
        {
            var result = await apiClient.CreateAsync(user.Data, true);

            user.Id = result.Id;

            return(IdentityResult.Success);
        }
        public async Task Should_read_many_async()
        {
            var contents = await client.GetAsync();

            for (var i = contents.Total; i < 20000; i++)
            {
                await client.CreateAsync(new TestEntityData
                {
                    String = RandomString.Create(1000)
                }, publish : true);
            }

            var found = await client.GetAll2Async();

            Assert.Equal(20000, found.Items.Count);
        }
Beispiel #3
0
        public ReadingFixture()
        {
            Task.Run(async() =>
            {
                Client = await TestClient.BuildAsync("reading");

                var contents = await Client.GetAllAsync();

                if (contents.Total != 10)
                {
                    foreach (var content in contents.Items)
                    {
                        await Client.DeleteAsync(content);
                    }

                    for (var i = 10; i > 0; i--)
                    {
                        await Client.CreateAsync(new TestEntityData {
                            Value = i
                        }, true);
                    }
                }
            }).Wait();
        }