Example #1
0
 static void startThread(object obj)
 {
     try
     {
         if (obj.GetType() != typeof(TheBestEllipseOfPoint))
         {
             return;
         }
         TheBestEllipseOfPoint theBestEllipseOfPoint = obj as TheBestEllipseOfPoint;
         theBestEllipseOfPoint.ComputeTheBestEllipses();
     }
     catch (Exception ex)
     {
         log.FatalFormat("Что-то пошло не так и при этом получено исключение: {0}", ex.Message);
     }
 }
Example #2
0
        //  [ExpectedException(typeof(IOException))]
        public void returnedEllipsesCountEqualBmCellsCount()
        {
            TheBestEllipseOfPoint target = new TheBestEllipseOfPoint(inData.dh.points
                                                                     , inData.bm.points
                                                                     , inData.bm.xAxis
                                                                     , inData.bm.yAxis
                                                                     , inData.bm.zAxis
                                                                     , inData.bm.xElPos
                                                                     , inData.bm.yElPos
                                                                     , inData.bm.zElPos
                                                                     , counter);

            target.ComputeTheBestEllipses();
            Ellipse[] ellipses;
            ellipses = target.getTheBestEllipses();
            for (int i = 0; i < ellipses.Count(); i++)
            {
                Assert.IsInstanceOf <Ellipse>(ellipses[i]);
            }
            Assert.AreEqual(inData.bm.points.Count(), ellipses.Count());
        }