Skip to content

Commit

Permalink
Updated nuget packages + fixed unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
devedse committed Apr 27, 2021
1 parent f89ccf9 commit a336678
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion DeveImageOptimizerWPF.Tests/Converters/KbConverterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public void KbToString()
var result = kbConverter.Convert(123456789L, null, null, CultureInfo.InvariantCulture);

//Assert
Assert.Equal("117,7MB", result.ToString());
Assert.Equal("117.7MB", result.ToString());
}
}
}
4 changes: 2 additions & 2 deletions DeveImageOptimizerWPF/Converters/KbConverter.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DeveImageOptimizer.Helpers;
using DeveCoolLib.Conversion;
using System;
using System.Globalization;
using System.Windows.Data;
Expand All @@ -10,7 +10,7 @@ public sealed class KbConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return ValuesToStringHelper.BytesToString((long)value);
return ValuesToStringHelper.BytesToString((long)value, culture);
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DeveImageOptimizer.Helpers;
using DeveCoolLib.Conversion;
using DeveImageOptimizerWPF.State.ProcessingState;
using System;
using System.Collections.ObjectModel;
Expand All @@ -19,7 +19,7 @@ public object Convert(object value, Type targetType, object parameter, CultureIn
}
var ofr = (ObservableCollection<OptimizableFileUI>)value;
var totalOptimizedSize = ofr.Sum(t => t.OriginalSize - t.OptimizedSize);
return ValuesToStringHelper.BytesToString(totalOptimizedSize);
return ValuesToStringHelper.BytesToString(totalOptimizedSize, culture);
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DeveImageOptimizer.Helpers;
using DeveCoolLib.Conversion;
using DeveImageOptimizerWPF.State.ProcessingState;
using System;
using System.Collections.ObjectModel;
Expand All @@ -19,7 +19,7 @@ public object Convert(object value, Type targetType, object parameter, CultureIn
}
var ofr = (ObservableCollection<OptimizableFileUI>)value;
var totalOptimizedSize = ofr.Sum(t => t.OptimizedSize);
return ValuesToStringHelper.BytesToString(totalOptimizedSize);
return ValuesToStringHelper.BytesToString(totalOptimizedSize, culture);
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DeveImageOptimizer.Helpers;
using DeveCoolLib.Conversion;
using DeveImageOptimizerWPF.State.ProcessingState;
using System;
using System.Collections.ObjectModel;
Expand All @@ -19,7 +19,7 @@ public object Convert(object value, Type targetType, object parameter, CultureIn
}
var ofr = (ObservableCollection<OptimizableFileUI>)value;
var totalOptimizedSize = ofr.Sum(t => t.OriginalSize);
return ValuesToStringHelper.BytesToString(totalOptimizedSize);
return ValuesToStringHelper.BytesToString(totalOptimizedSize, culture);
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DeveImageOptimizer.Helpers;
using DeveCoolLib.Conversion;
using DeveImageOptimizerWPF.State.ProcessingState;
using System;
using System.Globalization;
Expand All @@ -16,7 +16,7 @@ public object Convert(object value, Type targetType, object parameter, CultureIn
return string.Empty;
}
var ofr = (OptimizableFileUI)value;
return ValuesToStringHelper.BytesToString(ofr.OriginalSize - ofr.OptimizedSize);
return ValuesToStringHelper.BytesToString(ofr.OriginalSize - ofr.OptimizedSize, culture);
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Expand Down
4 changes: 2 additions & 2 deletions DeveImageOptimizerWPF/DeveImageOptimizerWPF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

<ItemGroup>
<PackageReference Include="CommonServiceLocator" Version="2.0.6" />
<PackageReference Include="DeveCoolLib" Version="1.0.53" />
<PackageReference Include="DeveImageOptimizer" Version="1.0.570" />
<PackageReference Include="DeveCoolLib" Version="1.0.503" />
<PackageReference Include="DeveImageOptimizer" Version="1.0.572" />
<PackageReference Include="MvvmLightLibs" Version="5.4.1.1" />
<PackageReference Include="Ookii.Dialogs.Wpf" Version="3.1.0" />
<PackageReference Include="PropertyChanged.Fody" Version="3.3.3" />
Expand Down

0 comments on commit a336678

Please sign in to comment.