public IActionResult Load(long?ID, long?ProductDetailID, long?DictionaryID, long?FactorType, long?FactorID, long?langId) { GetFactors operation = new GetFactors(); operation.ID = ID; operation.PricingID = ProductDetailID; operation.DictionaryID = DictionaryID; operation.ProductFactorID = FactorID; operation.FactorType = FactorType; if (langId.HasValue) { operation.LangID = langId; } else { operation.LangID = 1; } var result = operation.QueryAsync().Result; if (result is ValidationsOutput) { return(Ok(new ApiResult <List <ValidationItem> >() { Data = ((ValidationsOutput)result).Errors })); } else { return(Ok((List <Factor>)result)); } }
public void ShouldReturnIncorrectTransmissionFactors(string marketParticipantId, string llf, string date, string startTime) { var actual = new GetFactors(marketParticipantId, llf, date, startTime);; actual.Results.TransmissionFactor.Should().NotBe(_expectedTra); }
public void ShouldReturnCorrectDistributionFactors(string marketParticipantId, string llf, string date, string startTime) { var actual = new GetFactors(marketParticipantId, llf, date, startTime); actual.Results.DistributionFactor.Should().BeEquivalentTo(_expectedDis); }