예제 #1
0
        public void EqualsShouldReturnFalseIfEachObjectHasDefaultDataValue()
        {
            TestFrameworkV2.GenericParameterHelper firstObject  = new TestFrameworkV2.GenericParameterHelper();
            TestFrameworkV2.GenericParameterHelper secondObject = new TestFrameworkV2.GenericParameterHelper();

            TestFrameworkV1.Assert.IsFalse(firstObject.Equals(secondObject));
        }
예제 #2
0
        public void GenericParameterHelperShouldImplementIEnumerator()
        {
            this.sut = new TestFrameworkV2.GenericParameterHelper(15);

            int expectedLenghtOfList = 5;  // (15%10)
            int result = 0;

            foreach (var x in this.sut)
            {
                result++;
            }

            TestFrameworkV1.Assert.AreEqual(result, expectedLenghtOfList);
        }
예제 #3
0
        public void CompareToShouldReturnZeroIfTwoObjectHasSameDataValue()
        {
            TestFrameworkV2.GenericParameterHelper objectToCompare = new TestFrameworkV2.GenericParameterHelper(10);

            TestFrameworkV1.Assert.AreEqual(0, this.sut.CompareTo(objectToCompare));
        }
예제 #4
0
        public void EqualsShouldReturnFalseIfTwoObjectDoesNotHaveSameDataValue()
        {
            TestFrameworkV2.GenericParameterHelper objectToCompare = new TestFrameworkV2.GenericParameterHelper(5);

            TestFrameworkV1.Assert.IsFalse(this.sut.Equals(objectToCompare));
        }
예제 #5
0
        public void EqualsShouldReturnTrueIfTwoObjectHasSameDataValue()
        {
            TestFrameworkV2.GenericParameterHelper objectToCompare = new TestFrameworkV2.GenericParameterHelper(10);

            TestFrameworkV1.Assert.IsTrue(this.sut.Equals(objectToCompare));
        }
예제 #6
0
 public void TestInitialize()
 {
     this.sut = new TestFrameworkV2.GenericParameterHelper(10);
 }