public void GetAllProjectsTest() { ProjectSqlDAL projectSqlDAL = new ProjectSqlDAL(connectionString); IList <Project> result = projectSqlDAL.GetAllProjects(); Assert.IsNotNull(result); }
public void GetAllProjectsTest() { ProjectSqlDAL project = new ProjectSqlDAL(connectionString); List <Project> projects = project.GetAllProjects(); Assert.AreEqual(7, projects.Count); }
public void GetAllProjectsTest() { ProjectSqlDAL projectTest = new ProjectSqlDAL(connectionString); List <Project> testList = projectTest.GetAllProjects(); Assert.AreEqual(7, testList.Count); Assert.AreEqual("myTEST", testList[6].Name); }
public void GetAllProjects() { ProjectSqlDAL projectSqlDal = new ProjectSqlDAL(connectionString); List <Project> projectNames = projectSqlDal.GetAllProjects(); Assert.IsNotNull(projectNames); Assert.AreEqual(numOfProjects, projectNames.Count - 1); }
public void GetAllProjects() { ProjectSqlDAL projDal = new ProjectSqlDAL(connectionString); List <Project> proj = projDal.GetAllProjects(); Assert.AreEqual(7, proj.Count); Assert.AreEqual("projectname", proj[6].Name); }
public void GetAllProjectsTest() { ProjectSqlDAL sqlproject = new ProjectSqlDAL(connectionString); List <Project> projects = sqlproject.GetAllProjects(); Assert.IsNotNull(projects); }
public void GetAllProjectTest() { ProjectSqlDAL project = new ProjectSqlDAL(connectionString); IList <Project> list = project.GetAllProjects(); Assert.IsNotNull(list); Assert.IsTrue(list.Count <= maxProjectID); }
public void GetAllProjects_Test() { ProjectSqlDAL projectTest = new ProjectSqlDAL(connectionString); List <Project> allProjects = projectTest.GetAllProjects(); Assert.IsNotNull(allProjects); Assert.AreEqual(projectCount, allProjects.Count); }
public void GetAllProjectsTest() { ProjectSqlDAL projectSqlDAL = new ProjectSqlDAL(connectionString); IList <Project> projects = projectSqlDAL.GetAllProjects(); Assert.IsNotNull(projects, "GetAllProjects failed, the list was null."); Assert.AreEqual(numberOfProjects, projects.Count, "GetAllProjects failed, an incorrect number of projects has been returned."); }
public void GetAllProjectsTest() { ProjectSqlDAL newProject = new ProjectSqlDAL(connectionString); List <Project> projectList = newProject.GetAllProjects(); projects++; Assert.IsNotNull(projectList); Assert.AreEqual(projects, projectList.Count); }
public void ProjectListTest() { ProjectSqlDAL projectDal = new ProjectSqlDAL(connectionString); List <Project> getProject = projectDal.GetAllProjects(); Assert.IsNotNull(getProject); Assert.IsTrue(getProject.Count > 0); Assert.AreEqual("Project X", getProject[0]); Assert.AreEqual(6, getProject.Count); }
public void TestGetAllProjects() { //Arrange ProjectSqlDAL projectDAL = new ProjectSqlDAL(connectionString); //Act List <Project> projects = projectDAL.GetAllProjects(); //Assert Assert.AreEqual(projectCount, projects.Count); }
public void GetAllProjectsTest() { //Arrange ProjectSqlDAL dal = new ProjectSqlDAL(ConnectionString); //Act List <Project> projects = dal.GetAllProjects(); //Assert Assert.IsNotNull(projects); Assert.IsTrue(projects.Count > 0); Assert.IsNotNull(projects.Find(p => p.ProjectId == testProjectId)); }
private void GetAllProjects() { ProjectSqlDAL dal = new ProjectSqlDAL(DatabaseConnection); List <Project> projects = dal.GetAllProjects(); if (projects.Count > 0) { projects.ForEach(proj => { Console.WriteLine(proj); }); } else { Console.WriteLine("**** NO RESULTS ****"); } }
private void GetAllProjects() { ProjectSqlDAL dal = new ProjectSqlDAL(DatabaseConnection); IList <Project> projects = dal.GetAllProjects(); if (projects.Count > 0) { foreach (Project proj in projects) { Console.WriteLine(proj.ProjectId.ToString().PadRight(5) + proj.Name.PadRight(20) + proj.StartDate.ToShortDateString().PadRight(10) + proj.EndDate.ToShortDateString().PadRight(10)); } } else { Console.WriteLine("**** NO RESULTS ****"); } }
public void ProjectsTest() { Project thisProj = new Project(); thisProj.Name = "TESTprojTEST"; thisProj.StartDate = DateTime.Now; thisProj.EndDate = DateTime.Now; ProjectSqlDAL psdTest = new ProjectSqlDAL(connectionString); Assert.AreEqual(true, psdTest.CreateProject(thisProj)); Assert.AreEqual(projectCount + 1, psdTest.GetAllProjects().Count); Assert.AreEqual(true, psdTest.AssignEmployeeToProject(projectCount, 1)); Assert.AreEqual(true, psdTest.RemoveEmployeeFromProject(projectCount, 1)); Assert.AreNotEqual(true, psdTest.RemoveEmployeeFromProject(projectCount + 1, 1)); }
public void TestCreateProject() { //Arrange ProjectSqlDAL projectDAL = new ProjectSqlDAL(connectionString); Project updatedProject = new Project(); updatedProject.Name = "UpdatedProjectName"; updatedProject.StartDate = DateTime.Now; updatedProject.EndDate = updatedProject.StartDate.AddYears(1); //Act bool successChange = projectDAL.CreateProject(updatedProject); List <Project> projects = projectDAL.GetAllProjects(); //Assert Assert.AreEqual(projectCount + 1, projects.Count); }
public void GetProjectTest() { List <Project> GetProject = test.GetAllProjects(); Assert.AreEqual(8, GetProject.Count); }