Ejemplo n.º 1
0
        public void When_AddedNullCity_ThenShould_ThrowException()
        {
            // Arrange && Act
            var list = new GenericStringList();

            list.AddCity(null);
        }
Ejemplo n.º 2
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());
        }
Ejemplo n.º 3
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());
        }