public void ThenOperationResultIs(Table table) { KeyExpectedValueEntity instance = table.CreateInstance <KeyExpectedValueEntity>(); int result = (int)_scenarioContext[instance.Key]; int expected = Convert.ToInt32(instance.ExpectedValue); result.Should().Be(expected); }
public void ThenDimensionStructureIdPropertyIs(Table table) { KeyExpectedValueEntity instance = table.CreateInstance <KeyExpectedValueEntity>(); DimensionStructure result = _scenarioContext[instance.Key] as DimensionStructure; Check.IsNotNull(result); int exp = Convert.ToInt32(instance.ExpectedValue); result.IsActive.Should().Be(exp); }
public void ThenSourceFormatDimensionStructureNodeDeleteOperationResultIs(Table table) { KeyExpectedValueEntity instance = table.CreateInstance <KeyExpectedValueEntity>(); object result = _scenarioContext[instance.Key]; string expectedValue = instance.ExpectedValue; bool areAllDigits = expectedValue.All(char.IsDigit); if (areAllDigits) { result.Should().Be(Convert.ToInt32(expectedValue)); } }
public void ThenSingleSourceFormatDimensionStructureNodeItemRequestResultIs(Table table) { KeyExpectedValueEntity instance = table.CreateInstance <KeyExpectedValueEntity>(); DilibHttpClientResponse <SourceFormatDimensionStructureNode> result = _scenarioContext[instance.Key] as DilibHttpClientResponse <SourceFormatDimensionStructureNode>; Check.IsNotNull(result); if (instance.ExpectedValue == "null") { result.Result.Should().BeNull(); } }
public async Task ThenADimensionStructureIsRequestedResultIs(Table table) { KeyExpectedValueEntity instance = table.CreateInstance <KeyExpectedValueEntity>(); DimensionStructure dimensionStructure = _scenarioContext[instance.Key] as DimensionStructure; DilibHttpClientResponse <DimensionStructure> result = await _masterDataHttpClient .DimensionStructureHttpClient .GetByIdAsync(dimensionStructure) .ConfigureAwait(false); if (result.IsSuccess) { result.Result.Should().BeNull(); } else { result.IsSuccess.Should().BeTrue(); } }