public async Task ExceptionWhenInvalidSymbolNamePassedCallingGetCurrentDayFutureInstrumentData() { //Arrange var sut = new FetchFuturesDataService(fixture.HTTPClientFactory); //Act Func <Task <FutureInstrumentResponse> > func = async() => await sut.GetCurrentDayFutureInstrumentDataAsync("VINAY"); //Assert await func.Should().ThrowAsync <DeserializeException>(); }
public async Task GetSuccessfullyGetCurrentDayFutureInstrumentData() { //Arrange var sut = new FetchFuturesDataService(fixture.HTTPClientFactory); //Act var response = await sut.GetCurrentDayFutureInstrumentDataAsync("INFY"); //Assert response.Details.Should().NotBeEmpty("There should be collection of stock information"); response.SymbolName.Should().Be("INFY", "we are requesting data for INFY future instrument"); }