示例#1
0
        public void OverR2String_Int2String_StringValue()
        {
            //Arrange
            List_Custom <int> myList = new List_Custom <int>();
            int    IntAt0            = 2;
            int    IntAt1            = 4;
            int    IntAt2            = 6;
            int    IntAt3            = 8;
            string StringedList      = " 2, 4, 6, 8, ";

            //Act
            myList.Add(IntAt0);
            myList.Add(IntAt1);
            myList.Add(IntAt2);
            myList.Add(IntAt3);
            string outcome = myList.ToString();

            //Assert
            Assert.AreEqual(outcome, StringedList);
            //Test compares if to string method stringifies intigers
            //by comparing the method results with a hardcoded version
        }