public void InsertCassandraDataPoints() { IDataPointsSource pointsSource = new TxtDataPointsSource(); (pointsSource as TxtDataPointsSource).HeaderFile = @"P:\Projects\Licence\Main\docs\Data points\Constanta\secondHeader.txt"; (pointsSource as TxtDataPointsSource).DisplacementsFile = @"P:\Projects\Licence\Main\docs\Data points\Constanta\secondDisplacements.txt"; Assert.ThrowsException <ArgumentException>(() => { PointsDataSet dataset = pointsSource.CreateDataSet("Test", CoordinateSystem.UTM).First(); IDataPointsZoomLevelsSource zoomGenerator = new SquareMeanPZGenerator(); PointsDataSet[] set = zoomGenerator.CreateDataSetsZoomSets(dataset, 3, 19); }); //CassandraDataPointsRepository repository = CassandraDataPointsRepository.Instance; //Task<bool> result = repository.InsertPointsDataset(dataset); //result.Wait(); }
public void CheckDataSetCreation() { IDataPointsSource pointsSource = new TxtDataPointsSource(); IDataPointsRegionsSource regionSource = new PowerOfTwoRegionsSource(); (pointsSource as TxtDataPointsSource).HeaderFile = @"E:\temp\header.txt"; (pointsSource as TxtDataPointsSource).DisplacementsFile = @"E:\temp\displacements.txt"; (pointsSource as TxtDataPointsSource).LatitudeZone = 'T'; (pointsSource as TxtDataPointsSource).Zone = 35; PointsDataSet dataset = pointsSource.CreateDataSet("Test", CoordinateSystem.UTM).First(); bool regionsGenerationResult = regionSource.GenerateRegions(dataset); IEnumerable <PointType> points = PointType.GetPoints(dataset); IDataPointsZoomLevelsSource zoomGenerator = new SquareMeanPZGenerator(); PointsDataSet[] set = zoomGenerator.CreateDataSetsZoomSets(dataset, 3, 19); Assert.IsNotNull(dataset); Assert.IsNotNull(points); Assert.IsTrue(regionsGenerationResult); }