Ejemplo n.º 1
0
 public void GetBallonCharTest_NotPoped()
 {
     var color = ColorEnum.Blue;
     Balloon balloon = new Balloon(color);
     char expected = 'O';
     char actual = balloon.GetBalloonChar();
     Assert.AreEqual(expected, actual);
 }
Ejemplo n.º 2
0
        public void BalloonConstructorTest()
        {
            var color = ColorEnum.Blue;
            Balloon balloon = new Balloon(color);
            bool expected = balloon.Color == color && balloon.IsPopped == false;

            Assert.IsTrue(expected);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Performs a deep copy of the <see cref="Balloon"/> object.
        /// </summary>
        /// <returns>A copy of the object being cloned.</returns>
        public object Clone()
        {
            Balloon clone = new Balloon(this.Color);

            return clone;
        }