예제 #1
0
        public void ClusteringNullObjectsTest()
        {
            //Arrange
            ClusteringService clusteringService = new ClusteringService();
            var objRepo = new DetectedObjectRepository(GetContext());
            IEnumerable <DataLayer.Models.DetectedObject> objs = new List <DataLayer.Models.DetectedObject>();
            float         score     = 0;
            List <PointF> centroids = new List <PointF>();
            //Act
            var res = clusteringService.GetClusters(4, objs, out score, out centroids);

            //Assert
            Assert.Null(res);
        }
예제 #2
0
        public void ClusteringNullClustersTest()
        {
            //Arrange
            ClusteringService clusteringService = new ClusteringService();
            var           objRepo   = new DetectedObjectRepository(GetContext());
            var           objs      = objRepo.GetVacantObjects(4);
            float         score     = 0;
            List <PointF> centroids = new List <PointF>();
            //Act
            var res = clusteringService.GetClusters(0, objs, out score, out centroids);

            //Assert
            Assert.Null(res);
        }