예제 #1
0
        public void VerifyGettersAndSetters()
        {
            IUnitTestVerifier validator = new VerifyGettersAndSetters(task);
            validator.Verify(exampleData);

            IUnitTestVerifier countValidator = new VerifyPropertyCounter(task);
            countValidator.Verify(NUMBER_OF_PROPERTIES);
            Assert.AreEqual(73, task.TaskId, "Task ID as set in ctor");
        }
예제 #2
0
        public void CheckClone()
        {
            IUnitTestVerifier originalTaskSetterValidator = new VerifyGettersAndSetters(task);
            IUnitTestVerifier originalTaskCounterValidator = new VerifyPropertyCounter(task);
            WlbScheduledTask clone = task.Clone();
            IUnitTestVerifier clonedTaskSetterValidator = new VerifyGettersAndSetters(clone);
            IUnitTestVerifier clonedTaskCounterValidator = new VerifyPropertyCounter(clone);

            Assert.AreNotEqual(task, clone);

            //Check contents are all equal to the expected
            originalTaskCounterValidator.Verify(NUMBER_OF_PROPERTIES);
            clonedTaskCounterValidator.Verify(NUMBER_OF_PROPERTIES);

            originalTaskSetterValidator.Verify(exampleData);
            clonedTaskSetterValidator.Verify(exampleData);

        }