Beispiel #1
0
        public void PrependValueToEmptyList_ListDontContainsDifferentValue_ReturnsFalse()
        {
            T          value = this.CreateSampleValue();
            DLList <T> list  = new DLList <T>();

            list.Prepend(value);
            T    differentValue         = this.CreateDifferentValue();
            bool containsDifferentValue = list.Contains(differentValue);

            Assert.IsFalse(containsDifferentValue);
        }
Beispiel #2
0
        public void AppendValueToEmptyList_ListContainsValue_ReturnsTrue()
        {
            T valueToAdd = this.CreateSampleValue();

            DLList <T> list = new DLList <T>();

            list.Append(valueToAdd);

            T    valueToSeek  = this.CreateSampleValue();
            bool listContains = list.Contains(valueToSeek);

            Assert.IsTrue(listContains);
        }