Skip to content

Commit

Permalink
fix bug in the parsing of remaining EU data
Browse files Browse the repository at this point in the history
  • Loading branch information
winterleitner committed Mar 27, 2023
1 parent cb10a9a commit 22cabca
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
All notable changes to this project will be documented in this file.


## [2.0.6] - 2023-03-27
- fix bug that parsed the remaining EU data incorrectly

## [2.0.5] - 2023-03-07
- fix bug that returned null instead of an empty list for selectable phone numbers

Expand Down
5 changes: 3 additions & 2 deletions KontomanagerClient/KontomanagerClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,11 @@ IEnumerable<PackageUsage> ParseBasePageSections()
{
try
{
var match = Regex.Match(infoValue, @"(\d*) MB von (\d*) MB");
var match = Regex.Match(infoValue, @"(\d|.*) MB von (\d*) MB");
pu.DataEu.Total =
int.Parse(match.Groups[2].Value);
pu.DataEu.CorrectRemainingFree(int.Parse(match.Groups[1].Value));
pu.DataEu.CorrectRemainingFree((int)Math.Round(decimal.Parse(match.Groups[1].Value, NumberStyles.Any,
new CultureInfo("en-EN"))));
}
catch { }
}
Expand Down
9 changes: 7 additions & 2 deletions KontomanagerClient/KontomanagerClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@
<Copyright>Copyright (c) Felix Winterleitner 2023</Copyright>
<RepositoryUrl>https://github.com/winterleitner/kontomanager-websms-client</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageLicenseUrl>https://licenses.nuget.org/MIT</PackageLicenseUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<TargetFrameworks>net5.0;net6.0;net7.0;netcoreapp3.1;netstandard2.0</TargetFrameworks>
<PackageVersion>2.0.5</PackageVersion>
<PackageVersion>2.0.6</PackageVersion>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="HtmlAgilityPack" Version="1.11.46" />
</ItemGroup>

<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath="\"/>
</ItemGroup>

</Project>
4 changes: 4 additions & 0 deletions KontomanagerClientNet.sln.DotSettings.user
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
&lt;TestId&gt;xUnit::AD1BEAB0-0431-4154-B58C-5CCBF427ABEF::net7.0::BlitzkabineTests.TestAccounts.Test1&lt;/TestId&gt;
&lt;TestId&gt;xUnit::AD1BEAB0-0431-4154-B58C-5CCBF427ABEF::net7.0::BlitzkabineTests.TestAccounts.TestSubscriberIdsWithPreload&lt;/TestId&gt;
&lt;TestId&gt;xUnit::AD1BEAB0-0431-4154-B58C-5CCBF427ABEF::net7.0::BlitzkabineTests.TestAccounts.TestSubscriberIdsWithoutPreload&lt;/TestId&gt;
&lt;TestId&gt;xUnit::AD1BEAB0-0431-4154-B58C-5CCBF427ABEF::net7.0::BlitzkabineTests.TestAccounts.TestUnrealisticCredit&lt;/TestId&gt;
&lt;TestId&gt;xUnit::AD1BEAB0-0431-4154-B58C-5CCBF427ABEF::net7.0::BlitzkabineTests.TestAccounts.TestRemainingUnitsSmallerThanTotal&lt;/TestId&gt;
&lt;TestId&gt;xUnit::AD1BEAB0-0431-4154-B58C-5CCBF427ABEF::net7.0::BlitzkabineTests.TestAccounts.TestRemainingDataUnitsSmallerThanTotal&lt;/TestId&gt;
&lt;TestId&gt;xUnit::AD1BEAB0-0431-4154-B58C-5CCBF427ABEF::net7.0::BlitzkabineTests.TestAccounts.TestRemainingDataEuUnitsSmallerThanTotal&lt;/TestId&gt;
&lt;/TestAncestor&gt;
&lt;/SessionState&gt;</s:String>

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ The following projects seem to do the same thing as this client in other languag

# Changelog

### 27.03.2023 2.0.6
- fix bug that parsed the remaining EU data incorrectly

### 07.03.2023 2.0.5
- fix bug that returned null instead of an empty list for selectable phone numbers

Expand Down

0 comments on commit 22cabca

Please sign in to comment.