public void SaveProjects() { var context = new ProjectManagerAPI.Tests.TestContext(); var controller = new ProjectController(context); var okresult = controller.CreateProject(GetDemoProjectModel()); Assert.IsInstanceOfType(okresult, typeof(OkResult)); }
public void SaveUsers() { var context = new ProjectManagerAPI.Tests.TestContext(); var controller = new UserController(context); _counter.Increment(); var okresult = controller.CreateUser(GetDemoUser()); Assert.IsInstanceOfType(okresult, typeof(OkResult)); }
public void GetTasks() { var context = new ProjectManagerAPI.Tests.TestContext(); context.Tasks.Add(GetDemoTask()); var controller = new TaskController(context); var result = controller.GetTasks() as OkNegotiatedContentResult <DbSet <Task> >; Assert.IsNotNull(result); }
public void GetProjects() { var context = new ProjectManagerAPI.Tests.TestContext(); context.Projects.Add(GetDemoProject()); var controller = new ProjectController(context); var result = controller.GetProjects() as OkNegotiatedContentResult <DbSet <Project> >; ; Assert.IsNotNull(result); }