Skip to content
Permalink
Browse files

#11: Fixed Historical ExchangeRates UnitTest failing from 2019 January

  • Loading branch information...
Xavi Rueda Abelaira
Xavi Rueda Abelaira committed Feb 10, 2019
1 parent 16cfa02 commit d6a837b88cda704b0550625bfbb78a80649903d0
@@ -9,9 +9,9 @@
<Authors>Xelit3</Authors>
<Company>ChustaSoft</Company>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<Version>1.0.1.1</Version>
<AssemblyVersion>1.0.1.1</AssemblyVersion>
<FileVersion>1.0.1.1</FileVersion>
<Version>1.0.1.2</Version>
<AssemblyVersion>1.0.1.2</AssemblyVersion>
<FileVersion>1.0.1.2</FileVersion>
<PackageProjectUrl>https://github.com/Xelit3/StaticData</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/Xelit3/StaticData/blob/master/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/Xelit3/StaticData.git</RepositoryUrl>
@@ -8,8 +8,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.3.2" />
<PackageReference Include="MSTest.TestFramework" Version="1.3.2" />
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
</ItemGroup>

<ItemGroup>
@@ -94,7 +94,7 @@ public void Given_CurrenciesAndDate_When_GetBidirectionalInvoked_Then_ExchangeRa
public void Given_CurrenciesAndDateRange_When_GetHistoricalInvoked_Then_ExchangeRatesRetrived()
{
string currencyFrom = "USD", currencyTo = "EUR";
DateTime beginDate = DateTime.Now.AddDays(-30), endDate = DateTime.Now.AddDays(-25);
DateTime beginDate = DateTime.Today.AddDays(-30), endDate = DateTime.Today.AddDays(-25);

var data = _serviceUnderTest.GetHistorical(currencyFrom, currencyTo, beginDate, endDate).Result;

@@ -165,7 +165,7 @@ public void Given_OneUnknownConfiguredCurrencyWithMore_When_GetConfiguredLatestI
[TestMethod]
public void Given_ConfiguredCurrenciesAndDates_When_GetGetConfiguredHistoricalInvoked_Then_ActionResponseWithConfiguredAndBaseExchangeRatesRetrived()
{
DateTime beginDate = new DateTime(2018, 1, 1), endDate = new DateTime(2018, 1, 7);
DateTime beginDate = DateTime.Now.AddMonths(-1), endDate = DateTime.Now.AddMonths(-1).AddDays(7);

var actionResponse = _serviceUnderTest.GetConfiguredHistorical(beginDate, endDate);

@@ -10,9 +10,9 @@
<Company>ChustaSoft</Company>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<PackageId>ChustaSoft.StaticData</PackageId>
<Version>1.1.0.2</Version>
<AssemblyVersion>1.1.0.2</AssemblyVersion>
<FileVersion>1.1.0.2</FileVersion>
<Version>1.1.0.3</Version>
<AssemblyVersion>1.1.0.3</AssemblyVersion>
<FileVersion>1.1.0.3</FileVersion>
<PackageProjectUrl>https://github.com/Xelit3/StaticData</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/Xelit3/StaticData/blob/master/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/Xelit3/StaticData.git</RepositoryUrl>
@@ -1041,8 +1041,8 @@ https://github.com/Xelit3/StaticData/wiki</PackageReleaseNotes>
</ItemGroup>

<ItemGroup>
<PackageReference Include="ChustaSoft.Common" Version="1.0.12" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="ChustaSoft.Common" Version="1.0.20.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup>

@@ -8,8 +8,7 @@ public class CurrencyNotFoundException : BusinessException
{

private static string ErrorMessage = "One or more of the specified currencies could not be found: {0}";
private string requestedConversion;



public CurrencyNotFoundException(string currencyName) : base(string.Format(ErrorMessage, currencyName)) { }

0 comments on commit d6a837b

Please sign in to comment.
You can’t perform that action at this time.