public async Task <DetailedCarInfo> GetDetailedCarInfo(int autoId) { string allCarInfo = await GetAllCarInfo(autoId); DetailedCarInfo detailedCarInfo = _carMapper.MapToDetailedCarInfoObject(allCarInfo); return(detailedCarInfo); }
public async Task MapToDetailedCarInfoObject_CorrectJsonStringObject_ReturnsCorrectDetailedCarInfoObject() { // Arrange using (var streamReader = new StreamReader($"{_testFilesFolderPath}allCarInfoTestFile.json")) { string jsonString = await streamReader.ReadToEndAsync(); // Act DetailedCarInfo detailedCarInfo = _carMapper.MapToDetailedCarInfoObject(jsonString); // Assert Assert.IsType <DetailedCarInfo>(detailedCarInfo); Assert.True(detailedCarInfo.IsValid()); } }