public baseProjectUsersView ConvertToView(ProjectUsers item) { baseProjectUsersView view = new baseProjectUsersView(); view.ID = item.ID; view.UserID = item.UserID; view.ProjectID = item.ProjectID; return(view); }
public ProjectUsers ConvertToModel(baseProjectUsersView item) { ProjectUsers model = new ProjectUsers(); model.ID = item.ID; model.UserID = item.UserID; model.ProjectID = item.ProjectID; return(model); }
public void ConvertToModelTest() { ProjectUsersProvider target = new ProjectUsersProvider(); baseProjectUsersView item = _baseProjectUsersView; ProjectUsers expected = _ProjectUsers; ProjectUsers actual; actual = target.ConvertToModel(item); CompareModelObject(expected, actual); }
public void ConvertToViewTest() { ProjectUsersProvider target = new ProjectUsersProvider(); ProjectUsers item = _ProjectUsers; baseProjectUsersView expected = _baseProjectUsersView; baseProjectUsersView actual; actual = target.ConvertToView(item); CompareViewObject(expected, actual); }
public static void MyClassInitialize(TestContext testContext) { _ProjectUsers = new ProjectUsers() { ID = 1, UserID = 1, ProjectID = 1, }; _baseProjectUsersView = new baseProjectUsersView() { ID = 1, UserID = 1, ProjectID = 1, }; }
private static void CompareViewObject(baseProjectUsersView expected, baseProjectUsersView actual) { Assert.AreEqual(expected.ID, actual.ID); Assert.AreEqual(expected.UserID, actual.UserID); Assert.AreEqual(expected.ProjectID, actual.ProjectID); }