public void TestGetCorrectValueAsString() { ApiJsonStarshipsParser parser = new ApiJsonStarshipsParser(jsonStringWithAllDataMonth, mockLogger.Object); string result = parser.GetPropertyAsString("next"); Assert.Equal("next_value", result); }
public void TestGetIncorrectValueAsString() { ApiJsonStarshipsParser parser = new ApiJsonStarshipsParser(jsonStringWithoutValue, mockLogger.Object); Assert.Throws <KeyNotFoundException> (() => { string result = parser.GetPropertyAsString("next"); }); }