public void CanConvertParameter(string path) { // Arrange string expected = File.ReadAllText(Path.Combine("QueryParameters", $"{path}.json")); // Act string result = _sut.Convert(Path.Combine("QueryParameters", $"{path}.raml")); // Assert result.NormalizeNewLines().Should().BeEquivalentTo(expected.NormalizeNewLines()); }
public void CanConvertTypes_InlineAndInclude(string path) { // Arrange string expected = File.ReadAllText(Path.Combine("TypesAndSchemas", $"{path}.json")); // Act string result = _sut.Convert(Path.Combine("TypesAndSchemas", $"{path}.raml")); // Assert result.NormalizeNewLines().Should().BeEquivalentTo(expected.NormalizeNewLines()); }
public void CanConvertTypes_Enum() { // Arrange string expected = File.ReadAllText(Path.Combine("TypesAndSchemas", "TypesEnum.json")); // Act string result = _sut.Convert(Path.Combine("TypesAndSchemas", "TypesEnum.raml")); // Assert result.NormalizeNewLines().Should().BeEquivalentTo(expected.NormalizeNewLines()); }
private void ValidateUsesReplace(string path) { // Arrange string expected = File.ReadAllText(Path.Combine("Uses/TestFilesResultExpected", $"{path}Result.json")); // Act string result = _testResult.Convert(Path.Combine("Uses/TestFiles", $"{path}.raml")); // Assert result.NormalizeNewLines().Should().BeEquivalentTo(expected.NormalizeNewLines()); }