示例#1
0
        public void When_RemoveNullCity_ThenShould_ThrowException()
        {
            // Arrange && Act
            var list = new GenericStringList();

            list.RemoveCity(null);
        }
示例#2
0
        public void When_ClassIsInstanciated_ThenShould_Have3Elements()
        {
            // Arrange && Act
            var list = new GenericStringList();

            // Assert
            Assert.IsTrue(list.Capacity() == 3);
        }
示例#3
0
        public void When_AddedNotCity_ThenShould_IncreaseListCapacity()
        {
            // Arrange && Act
            var list        = new GenericStringList();
            var oldCapacity = list.Capacity();

            // Act
            list.AddCity("Constanta");
            // Assert
            Assert.AreEqual(oldCapacity + 1, list.Capacity());
        }
示例#4
0
        public void When_RemoveNotNullCity_ThenShould_DecreaseListCapacity()
        {
            // Arrange
            var list = new GenericStringList();

            list.AddCity(CITY);
            var oldCapacity = list.Capacity();

            // Act
            list.RemoveCity(CITY);
            // Assert
            Assert.AreEqual(oldCapacity - 1, list.Capacity());
        }