Example #1
0
        public void Maturity_DeletePass()
        {
            //Arrange
            MaturityList expectedMaturityList = new MaturityList();
            expectedMaturityList.GetAll();
            target.IsNew = true;
            target.MaturityLevel = "XXX";

            //Act
            target.Save();
            target.Deleted = true;
            target.IsNew = false;
            target.IsDirty = true;
             target.Save();

            MaturityList actualMaturityList = new MaturityList();
            actualMaturityList.GetAll();

            //Assert
            Assert.AreEqual(expectedMaturityList.List.Count(), actualMaturityList.List.Count(), "Hurray!");
        }
Example #2
0
 protected void ddlMaturity_Populate()
 {
     //make a new MaturityList called matList
     MaturityList matList = new MaturityList();
     //Get all of maturity levels
     matList.GetAll();
     //Bind list to ddlMaturity
     ddlMaturity.DataSource = matList.List;
     ddlMaturity.DataTextField = "MaturityLevel";
     ddlMaturity.DataValueField = "ID";
     ddlMaturity.DataBind();
 }