Exemplo n.º 1
0
        public void Add_ShouldAddTargetedInstanceInCollection()
        {
            AbstractShape   expectedShape         = new Square("SqareName", 44);
            ShapeCollection actualShapeCollection = new ShapeCollection();

            actualShapeCollection.Add(expectedShape);

            Assert.AreEqual(1, actualShapeCollection.Count);

            Assert.AreEqual(expectedShape.Name, actualShapeCollection.Single <AbstractShape>().Name);
            Assert.AreEqual(expectedShape.Surface, actualShapeCollection.Single <AbstractShape>().Surface);
        }