public void ParseResponse_InvalidJsonResponse_ThrowsJsonReaderException() { // Arrange var sut = new VehicleDataLookupResponseParser(); // Act/Assert Assert.Throws <JsonReaderException>(() => sut.ParseResponse(InvalidJsonRawResponse)); }
public void ParseResponse_NullArg_ThrowsArgumentNullException() { // Arrange var sut = new VehicleDataLookupResponseParser(); // Act/Assert Assert.Throws <ArgumentNullException>(() => sut.ParseResponse(null)); }
public void ParseResponse_ValidResponse_ReturnsDataWithExpectedSearchCriteria() { // Arrange const string expectedSearchCriteria = "VIN:WDBJF65J1YB039105"; var sut = new VehicleDataLookupResponseParser(); // Act var data = sut.ParseResponse(ValidRawResponse); // Assert Assert.Equal(expectedSearchCriteria, data.SearchCriteria); }
public void ParseResponse_ValidResponseData_ReturnsDataWithExpectedNumberOfResults() { // Arrange const int expectedCount = 132; var sut = new VehicleDataLookupResponseParser(); // Act var data = sut.ParseResponse(ValidRawResponse); // Assert Assert.Equal(expectedCount, data.Count); }