Beispiel #1
0
        public void SaveProjects()
        {
            var context    = new ProjectManagerAPI.Tests.TestContext();
            var controller = new ProjectController(context);
            var okresult   = controller.CreateProject(GetDemoProjectModel());

            Assert.IsInstanceOfType(okresult, typeof(OkResult));
        }
Beispiel #2
0
        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));
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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);
        }