Example #1
0
        public void ValidateGeofence_CloseTheOpenGeofence()
        {
            var result = GeofenceValidation.ValidateWKT(_invalidBoundary_NotClosed);

            Assert.Equal(GeofenceValidation.ValidationOk, result);

            var points     = GeofenceValidation.ParseGeometryDataPointLL(_invalidBoundary_NotClosed);
            var enumerable = points.ToList();

            Assert.Equal(3, enumerable.Count);

            var wkt = GeofenceValidation.GetWicketFromPoints(GeofenceValidation.MakingValidPoints(enumerable));

            Assert.Equal(_validBoundary, wkt);
        }
Example #2
0
        public void ValidateGeofence_HappyPath()
        {
            var result = GeofenceValidation.ValidateWKT(_validBoundary);

            Assert.Equal(GeofenceValidation.ValidationOk, result);

            var points     = GeofenceValidation.ParseGeometryDataPointLL(_validBoundary);
            var enumerable = points.ToList();

            Assert.Equal(4, enumerable.Count);

            var wkt = GeofenceValidation.GetWicketFromPoints(GeofenceValidation.MakingValidPoints(enumerable));

            Assert.Equal(_validBoundary, wkt);
        }