Beispiel #1
0
        public void GetUsers_WhenUsersAreAvailable_ReturnsUsers()
        {
            IDataGateway gateway = Substitute.For <IDataGateway>();

            gateway.GetAllUsers().Returns(new List <User>
            {
                new User()
            });

            UserRepository repository = new UserRepository(gateway);
            var            users      = repository.GetUsers();

            Assert.AreEqual(1, users.Count());
        }