コード例 #1
0
 public void PointDistanceStructDouble_inNewClassNull_outExecption()
 {
     //arrange
     //actual
     BechmarkClass bClass = new BechmarkClass();
     var           ss     = bClass.PointDistance(new PointStruct <float>(), null);
     //assert
 }
コード例 #2
0
 public void PointDistanceClassFloat_inNullNewClass_outExecption()
 {
     //arrange
     //actual
     BechmarkClass bClass = new BechmarkClass();
     var           ss     = bClass.PointDistance(null, new PointClass <float>());
     //assert
 }
コード例 #3
0
        public void PointDistanceClassFloat_in0_out0()
        {
            //arrange
            float expected = 0;
            //actual
            BechmarkClass      bClass = new BechmarkClass();
            PointClass <float> p1     = new PointClass <float>()
            {
                PointX = 0, PointY = 0
            };
            PointClass <float> p2 = new PointClass <float>()
            {
                PointX = 0, PointY = 0
            };

            float actual = bClass.PointDistance(p1, p2);

            //assert
            Assert.AreEqual <float>(expected, actual);
        }
コード例 #4
0
        public void PointDistanceStructDoubleDouble_in0_out0()
        {
            //arrange
            float expected = 0;
            //actual
            BechmarkClass        bClass = new BechmarkClass();
            PointStruct <double> p1     = new PointStruct <double>()
            {
                PointX = 0, PointY = 0
            };
            PointStruct <double> p2 = new PointStruct <double>()
            {
                PointX = 0, PointY = 0
            };

            float actual = (float)bClass.PointDistance(p1, p2);

            //assert
            Assert.AreEqual <float>(expected, actual);
        }