Beispiel #1
0
        public void Volume_OneLengthTwoCube_ReturnCubeVolume()
        {
            // arrange
            service = new ThreeDimensionsMeshService
            {
                Xs  = new double[] { 0, 1, 2 },
                Ys  = new double[] { 0, 1 },
                Z1s = new double[] { 0, 0, 0, 0, 0, 0 },
                Z2s = new double[] { 1, 1, 1, 1, 1, 1 }
            };

            // act
            var result = service.Volume();

            // assert
            Assert.AreEqual(2, result);
        }
Beispiel #2
0
        public void Volume_TwoFacelengthCube_ReturnCubeVolume()
        {
            // arrange
            service = new ThreeDimensionsMeshService
            {
                Xs  = new double[] { 0, 2 },
                Ys  = new double[] { 0, 2 },
                Z1s = new double[] { 0, 0, 0, 0 },
                Z2s = new double[] { 2, 2, 2, 2 }
            };

            // act
            var result = service.Volume();

            // assert
            Assert.AreEqual(8, result);
        }