Ejemplo n.º 1
0
 public void TestCreateBOStatus()
 {
     //---------------Set up test pack-------------------
     Car bo = new Car();
     //---------------Execute Test ----------------------
     //---------------Test Result -----------------------
     IBOStatus boStatus = new BOStatus(bo);
     //---------------Tear Down -------------------------
     Assert.AreSame(boStatus.BusinessObject, bo);
 }
Ejemplo n.º 2
0
 public void Test_SetBONull()
 {
     //---------------Set up test pack-------------------
     Car bo = new Car();
     BOStatus status = new BOStatus(bo);
     //---------------Execute Test ----------------------
     try
     {
         status.BusinessObject = null;
         Assert.Fail("expected ArgumentNullException");
     }
     //---------------Test Result -----------------------
     catch (ArgumentNullException ex)
     {
         StringAssert.Contains("Value cannot be null", ex.Message);
         StringAssert.Contains("value", ex.ParamName);
     }
 }
Ejemplo n.º 3
0
        public void TestBoStatusNotEqual()
        {
            //---------------Set up test pack-------------------
            BOStatus boStatus1 = new BOStatus(new Car());
            boStatus1.SetBOFlagValue(BOStatus.Statuses.isDeleted, true);

            BOStatus boStatus2 = new BOStatus(new Car());
            boStatus2.SetBOFlagValue(BOStatus.Statuses.isDeleted, false);
            //---------------Execute Test ----------------------
            bool equal = boStatus1.Equals(boStatus2);
            //---------------Test Result -----------------------
            Assert.IsFalse(equal);
            Assert.AreNotEqual(boStatus1.GetHashCode(), boStatus2.GetHashCode());
        }
Ejemplo n.º 4
0
 public void TestBoStatusEqual_Null()
 {
     //---------------Set up test pack-------------------
     BOStatus boStatus1 = new BOStatus(new Car());
     //---------------Execute Test ----------------------
     bool equal = boStatus1.Equals(null);
     //---------------Test Result -----------------------
     Assert.IsFalse(equal);
 }