public void Edit()
        {
            ReleasePlanController controller = new ReleasePlanController();
            Task <ActionResult>   result     = controller.Edit(1) as Task <ActionResult>;

            Assert.IsNotNull(result);
        }
        public void Edit_NullAgr()
        {
            ReleasePlanController controller = new ReleasePlanController();
            Task <ActionResult>   result     = controller.Edit((int?)null) as Task <ActionResult>;

            Assert.IsTrue((result.Result as HttpStatusCodeResult).StatusCode == (int)HttpStatusCode.BadRequest);
        }
        public void Create_EntityArg()
        {
            ReleasePlanController controller = new ReleasePlanController();
            Task <ActionResult>   result     = controller.Create(new ReleasePlanEntity()) as Task <ActionResult>;

            Assert.IsNotNull(result.Result);
        }
        public void Create_NullAgr()
        {
            ReleasePlanController controller = new ReleasePlanController();
            ActionResult          result     = controller.Create() as ActionResult;

            Assert.IsNotNull(result);
        }
        public void ReleasePlanControllerTest()
        {
            ReleasePlanController controller = new ReleasePlanController();

            controller = new ReleasePlanController(controller.UserManager, controller.SignInManager);
            Assert.IsNotNull(controller);
        }
        public void Delete()
        {
            ReleasePlanController controller = new ReleasePlanController();
            Task <ActionResult>   result     = controller.Delete(10) as Task <ActionResult>;

            Assert.IsNotNull(result);
        }
        public void Create_EntityArg_IsValid()
        {
            ReleasePlanController    controller = new ReleasePlanController();
            Mock <ReleasePlanEntity> mock       = new Mock <ReleasePlanEntity>();
            Task <ActionResult>      result     = controller.Create(mock.Object) as Task <ActionResult>;

            Assert.IsNotNull(result.Result);
        }
        public void Edit_EntityAgr_IsValid()
        {
            ReleasePlanController    controller = new ReleasePlanController();
            Mock <ReleasePlanEntity> mock       = new Mock <ReleasePlanEntity>();
            Task <ActionResult>      result     = controller.Edit(mock.Object) as Task <ActionResult>;

            Assert.IsTrue((result.Result as HttpStatusCodeResult).StatusCode == (int)HttpStatusCode.BadRequest);
        }
        public void Create()
        {
            ReleasePlanController controller = new ReleasePlanController();

            string            str    = "1";
            ReleasePlanEntity entity = new ReleasePlanEntity()
            {
                CreateAt = DateTime.Now, CreateBy = str, DevOwner = str, GitRepoCommitId = str, GitRepoRefTag = str, GitRepoTag = str, Id = 1, JenkinsBuildNo = 1, NotificationCcList = str, NotificationList = str, OpsOwner = str, PlannedReleaseAt = DateTime.Now, ProductOwner = str, ReleaseEnv = str, ReleaseNotes = str, RepleasePackageName = str, Service = str, ServiceGitPath = str, Status = 1, TestOwner = str, UpdateAt = DateTime.Now, UpdateBy = str
            };
            Task <ActionResult> result = controller.Create(entity) as Task <ActionResult>;

            releasePlanID = entity.Id;
            Assert.IsNotNull(result.Result);
        }