public void IncorrectDateForBankApi2() { // Arrange JsonCurrencyImporter currencyImporter = new JsonCurrencyImporter(); // Act try { var data = currencyImporter.Import(DateTime.Parse("2621.03.25")); Assert.Null(data); } catch (Exception e) { Assert.True(e is NoItemsException); } }
public void ReturnNotNullJsonData() { // Arrange JsonCurrencyImporter currencyImporter = new JsonCurrencyImporter(); try { // Act var data = currencyImporter.Import(DateTime.Now); // Assert Assert.NotEqual(data, null); } catch (Exception e) { Assert.True(e is NoItemsException); } }