Exemplo n.º 1
0
        public async Task FindAllUsersAsyncTest()
        {
            // Create a new user
            var newUser = await UserHelper.CreateNewUserAsync();

            // Get list of users
            var users = await APUsers.FindAllAsync();

            users.ForEach(x => Console.WriteLine("id: {0} username: {1}",
                                                 x.Id,
                                                 x.Username));
        }
Exemplo n.º 2
0
        public async Task FindAllUsersWithQueryAsyncTest()
        {
            // Create a new user
            var newUser = await UserHelper.CreateNewUserAsync();

            // Delay for index propagation on test bench.
            await Utilities.Delay(1500);

            // Get list of users
            var users = await APUsers.FindAllAsync(Query.Property("username").IsEqualTo(newUser.Username));

            Assert.IsTrue(users != null && users.Count == 1);
            Assert.IsTrue(users[0].Id == newUser.Id);
            users.ForEach(x => Console.WriteLine("id: {0} username: {1}",
                                                 x.Id,
                                                 x.Username));
        }