Skip to content

Commit 725588e

Browse files
committed
Passed test and updated readme
1 parent c494890 commit 725588e

File tree

14 files changed

+527
-554
lines changed

14 files changed

+527
-554
lines changed

Src/Azihub.GlobalData.Base.Tests/.env.template

Lines changed: 0 additions & 5 deletions
This file was deleted.

Src/Azihub.GlobalData.Base.Tests/Azihub.GlobalData.Base.Tests.csproj

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,18 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="CoinmarketCap.Net.Core" Version="1.0.1" />
16-
<PackageReference Include="DotNetEnv" Version="2.1.1" />
1715
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
1816
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
19-
<PackageReference Include="Nexmo.Csharp.Client" Version="4.2.1" />
20-
<PackageReference Include="NoobsMuc.Coinmarketcap.Client" Version="2.0.1" />
2117
<PackageReference Include="xunit" Version="2.4.1" />
2218
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
2319
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2420
<PrivateAssets>all</PrivateAssets>
2521
</PackageReference>
26-
<PackageReference Include="coverlet.collector" Version="1.3.0">
27-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
28-
<PrivateAssets>all</PrivateAssets>
29-
</PackageReference>
3022
</ItemGroup>
3123

3224
<ItemGroup>
3325
<ProjectReference Include="..\Azihub.GlobalData.Banks\Azihub.GlobalData.Banks.csproj" />
3426
<ProjectReference Include="..\Azihub.GlobalData.Base\Azihub.GlobalData.Base.csproj" />
3527
</ItemGroup>
3628

37-
<ItemGroup>
38-
<Reference Include="Microsoft.Extensions.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60" />
39-
</ItemGroup>
40-
4129
</Project>

Src/Azihub.GlobalData.Base.Tests/GdCountryTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
using GlobalData.Base.Country;
2-
using GlobalData.Base.Country.Exceptions;
1+
using Azihub.GlobalData.Base.Country;
2+
using Azihub.GlobalData.Base.Country.Exceptions;
33
using Xunit;
44

5-
namespace GlobalData.Base.Tests
5+
namespace Azihub.GlobalData.Base.Tests
66
{
77
public class GdCountryTests
88
{
@@ -14,14 +14,14 @@ public class GdCountryTests
1414
[InlineData("us")]
1515
public void ParseCountryIso2CodeTest(string code)
1616
{
17-
GdCountryIso2Code countryCode = GdCountryIso2Code.FromString( code );
17+
CountryIso2Code countryCode = CountryIso2Code.FromString( code );
1818
Assert.Equal(code.ToUpper(), countryCode.Code);
1919
}
2020

2121
[Fact]
2222
public void ParseCountryIso2CodeFailTest()
2323
{
24-
Assert.Throws<InvalidCountryCodeException>( () => GdCountryIso2Code.FromString("ZZ") );
24+
Assert.Throws<InvalidCountryCodeException>( () => CountryIso2Code.FromString("ZZ") );
2525
}
2626
#endregion
2727

@@ -51,7 +51,7 @@ public void ParseCountryIso3CodeFailTest()
5151
[InlineData(Iso2Codes.US, 1, "USD")]
5252
public void GetGdCountry(string code, uint callingCode, string expectedCurrency)
5353
{
54-
var country = GdCountryList.Get( GdCountryIso2Code.FromString(code) );
54+
var country = CountryList.Get( CountryIso2Code.FromString(code) );
5555
Assert.Equal(callingCode, country.CallingCode);
5656
Assert.Equal(expectedCurrency, country.Currency.Code);
5757
}

Src/Azihub.GlobalData.Base.Tests/GdCurrencyTests.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
using GlobalData.Base.Country;
2-
using GlobalData.Base.Currency;
1+
using Azihub.GlobalData.Base.Country;
2+
using Azihub.GlobalData.Base.Currency;
33
using Xunit;
44
using Xunit.Abstractions;
55

6-
namespace GlobalData.Base.Tests
6+
namespace Azihub.GlobalData.Base.Tests
77
{
88
public class GdCurrencyTests
99
{
1010
private readonly ITestOutputHelper _output;
1111
public GdCurrencyTests(ITestOutputHelper output)
1212
{
1313
_output = output;
14-
DotNetEnv.Env.Load();
15-
DotNetEnv.Env.TraversePath().Load();
1614

1715
}
1816

@@ -39,6 +37,7 @@ public void GetGdCurrencyFiat(string code, string expectedCountryCodeStr)
3937
// Symbol = r.CurrencySymbol,
4038
// });
4139
var currency = GdCurrencyFiatList.Get(GdCurrencyFiatCode.FromString(code));
40+
_output.WriteLine($"code: {code}, Received: {currency.Code} is expecting: {expectedCountryCodeStr}");
4241
Assert.Contains(currency.Countries, x =>x.Code == expectedCountryCodeStr);
4342
}
4443
}

Src/Azihub.GlobalData.Base/Authority/IAuthority.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
{
33
public interface IAuthorityCode
44
{
5-
public string Code { get; set; }
5+
string Code { get; set; }
66
}
77

88
public interface IAuthority
99
{
10-
public string Name { get; set; }
10+
string Name { get; set; }
1111
/// <summary>
1212
/// Two Letter code assignment of authority or region
1313
/// </summary>
14-
public IAuthorityCode AuthorityCode { get; set; }
15-
public Type Type { get; set; }
14+
IAuthorityCode AuthorityCode { get; set; }
15+
Type Type { get; set; }
1616
}
1717

1818
public enum Type
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.1</TargetFramework>
4+
<TargetFramework>netstandard2.0</TargetFramework>
55
</PropertyGroup>
66

77
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
88
<DocumentationFile></DocumentationFile>
99
<WarningsAsErrors>;NU1605;NU1574</WarningsAsErrors>
1010
</PropertyGroup>
1111

12-
<ItemGroup>
13-
<Folder Include="Country\NewFolder\" />
14-
<Folder Include="Address\" />
15-
</ItemGroup>
16-
1712
</Project>

Src/Azihub.GlobalData.Base/Country/Country.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
using Azihub.GlobalData.Base.Country.Interfaces;
23
using Azihub.GlobalData.Base.Currency;
34

45
namespace Azihub.GlobalData.Base.Country

0 commit comments

Comments
 (0)