public void Test_GetPointsByType_Staticpoints()
        {
            IEnumerable <Point> expected = staticPointList;

            Fragment.ICPFragmentType type   = Fragment.ICPFragmentType.Static;
            IEnumerable <Point>      actual = correspondences.GetPointsByType(type);

            Assert.That(actual, Is.EquivalentTo(expected));
        }
        private void TestGetPoint_InvalidEnum_Helper()
        {
            Point staticPoint = Auxilaries.RandomPoint();
            Point modelPoint  = Auxilaries.RandomPoint();

            Correspondence correspondence = new Correspondence(
                staticPoint: staticPoint,
                modelPoint: modelPoint
                );

            Fragment.ICPFragmentType type = (Fragment.ICPFragmentType) 99;

            correspondence.GetPoint(type);
        }
Ejemplo n.º 3
0
        public Point GetPoint(Fragment.ICPFragmentType type)
        {
            switch (type)
            {
            case Fragment.ICPFragmentType.Model:
                return(ModelPoint);

            case Fragment.ICPFragmentType.Static:
                return(StaticPoint);

            default:
                throw new ArgumentException("Invalid enum type.");
            }
        }
        public List <Point> GetPointsByType(Fragment.ICPFragmentType type)
        {
            switch (type)
            {
            case Fragment.ICPFragmentType.Model:
                return(this.ModelPoints);

            case Fragment.ICPFragmentType.Static:
                return(this.StaticPoints);

            default:
                throw new System.ArgumentException("Invalid enum type.");
            }
        }
        public void TestGetPoint_StaticPoint()
        {
            Point staticPoint = Auxilaries.RandomPoint();
            Point modelPoint  = Auxilaries.RandomPoint();

            Correspondence correspondence = new Correspondence(
                staticPoint: staticPoint,
                modelPoint: modelPoint
                );

            Fragment.ICPFragmentType type = Fragment.ICPFragmentType.Static;

            Point actual = correspondence.GetPoint(type);

            Assert.AreEqual(staticPoint, actual);
        }