コード例 #1
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);
        }