/// <summary>
 /// Return a *new* point struct whose X and Y values are twice those of the input
 /// instance.
 /// </summary>
 /// <param name="pointClass"> 
 /// The input class whose X and Y to double.
 /// </param>
 /// <returns>
 /// A new instance of the point class whose X and Y values are double those of the 
 /// input.
 /// </returns>
 public PointStruct ReturnADoubledPointStruct(PointStruct pointStruct)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 2
0
        public void Problem1_PointStruct_WithReturnValue()
        {
            // Instantiate the problem
            var target = new Problem1();

            // Set up the test
            int x = 5;
            int y = 10;
            var pointStruct = new PointStruct(x, y);
            var result = target.ReturnADoubledPointStruct(pointStruct);

            // Assert truths.
            Assert.IsNotNull(result);
            Assert.AreNotSame(result, pointStruct);
            Assert.AreEqual(x * 2, result.X);
            Assert.AreEqual(y * 2, result.Y);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Return a *new* point struct whose X and Y values are twice those of the input
 /// instance.
 /// </summary>
 /// <param name="pointClass">
 /// The input class whose X and Y to double.
 /// </param>
 /// <returns>
 /// A new instance of the point class whose X and Y values are double those of the
 /// input.
 /// </returns>
 public PointStruct ReturnADoubledPointStruct(PointStruct pointStruct)
 {
     throw new NotImplementedException();
 }