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

            Assert.IsNotNull(result);
        }
        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_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);
        }
Exemplo n.º 4
0
        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);
        }