Beispiel #1
0
        public void GetAllUsersReturnsAllCreatedUsers()
        {
            const string username1 = "TestUser1";
            const string username2 = "TestUser2";

            var repository = new InMemoryUserRepository();

            var createdUser1 = repository.CreateUser(username1);
            var createdUser2 = repository.CreateUser(username2);

            var allUsers = repository.GetAllUsers().ToList();

            Assert.That(allUsers.Count, Is.EqualTo(2));
            Assert.That(allUsers, Contains.Item(createdUser1));
            Assert.That(allUsers, Contains.Item(createdUser2));
        }