GetProjects() public method

public GetProjects ( ) : IEnumerable
return IEnumerable
示例#1
0
        public void GetProjects()
        {
            ProjectServices services = new ProjectServices();

            var result = services.GetProjects();

            Assert.AreEqual(0, result.Count());
        }
示例#2
0
        public void GetThreeProjects()
        {
            var projects = new List<Project>()
            {
                new Project() { Id = 1, Name = "Project 1" },
                new Project() { Id = 2, Name = "Project 2" },
                new Project() { Id = 3, Name = "Project 3" }
            };

            ProjectServices services = new ProjectServices(projects);

            var result = services.GetProjects();

            Assert.AreEqual(3, result.Count());
        }