Skip to content

Commit

Permalink
1860 fixed (#1861)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgeDaskalakis authored Jan 9, 2023
1 parent cb885cb commit 20edf28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using OSPSuite.Core.Services;
using OSPSuite.Infrastructure.Import.Services;

Expand Down Expand Up @@ -50,7 +51,8 @@ protected override void LoadFromFile(string path)
while (csv.ReadNextRecord())
{
csv.CopyCurrentRecordTo(currentRow);
var rowList = currentRow.Select(x => x.Replace(csvSeparators.DecimalSeparator, '.')).ToList();
var currentCultureDecimalSeparator = Convert.ToChar(Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator);
var rowList = currentRow.Select(x => x.Replace(csvSeparators.DecimalSeparator, currentCultureDecimalSeparator)).ToList();
var levels = getMeasurementLevels(rowList);
dataSheet.CalculateColumnDescription(levels);
dataSheet.AddRow(rowList);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,6 @@ public void should_import_simple_data_from_csv()
importFromConfiguration.Count.ShouldBeEqualTo(1);
var column = importFromConfiguration.First().Columns.First(x => x.Name.Equals("Concentration"));
column.ConvertToDisplayValues(column.Values).ShouldContain(0.2168224f, 0.4386293f);

// importFromConfiguration.First().Columns
}

[Observation]
Expand Down

0 comments on commit 20edf28

Please sign in to comment.