Exemplo n.º 1
0
        public void TestUpdate()
        {
            var logic      = new DeploymentLogic();
            var deployment = logic.GetByName("TestCreate");

            deployment.Description = "Update Test Deployment";
            logic.Update(deployment, "TestCreate");
            var updatedDeployment = logic.GetByName("TestCreate");

            Assert.Equals(deployment.Description, updatedDeployment.Description);
        }
Exemplo n.º 2
0
        public void TestDelete()
        {
            var logic = new DeploymentLogic();

            logic.Delete("TestCreate");
            Assert.IsNull(logic.GetByName("TestCreate"));
        }
Exemplo n.º 3
0
        public void TestCreate()
        {
            var deployment = new Deployment
            {
                Name = "TestCreate",
                DeploymentDuration = "2 hours",
                Description        = "Test Deployment",
                IssuesEncoutered   = "None yet",
                ScheduleTime       = new DateTime(2019, 9, 1),
                Status             = "To Do"
            };
            var logic = new DeploymentLogic();

            logic.Create(deployment);
            Assert.IsNotNull(logic.GetByName(deployment.Name));
        }
Exemplo n.º 4
0
        // GET api/<controller>/name
        public Deployment Get(string name)
        {
            var result = _logic.GetByName(name);

            return(result);
        }