Beispiel #1
0
        public async Task GetUsers_ShouldContain_Member()
        {
            var service = new TestDataService();
            var users   = await service.GetUsers();

            Assert.True(users.Any());
            Assert.NotEmpty(users.Where(x => x.RoleType == RoleType.Member));
        }
Beispiel #2
0
        public async Task GetUsers_ShouldContain_Admin_UseShouldly()
        {
            var service = new TestDataService();
            var users   = await service.GetUsers();

            users.ShouldNotBeEmpty();
            users.ShouldContain(users.Where(x => x.RoleType == RoleType.Admin).FirstOrDefault());
        }