public void verify_tissueWithEllipsoid_GetNeighborRegionIndex_method_correct_when_photon_on_ellipsoid() { // Ellipsoid Photon photon = new Photon( // on top of ellipsoid pointed into it new Position(0, 0, 1.0), new Direction(0.0, 0, 1.0), 1, _tissueWithEllipsoid, 1, new Random()); var index = _tissueWithEllipsoid.GetNeighborRegionIndex(photon); Assert.AreEqual(index, 3); }
public void verify_GetNeighborRegionIndex_method_returns_correct_result() { Photon photon = new Photon( // on top of ellipsoid pointed into it new Position(0, 0, 1.0), new Direction(0.0, 0, 1.0), _tissue, 1, new Random()); var index = _tissue.GetNeighborRegionIndex(photon); Assert.AreEqual(index, 3); photon.DP.Position = new Position(0, 0, 100.0); // at bottom of slab pointed out index = _tissue.GetNeighborRegionIndex(photon); Assert.AreEqual(index, 2); }