public void GetConfiguration_WhenSuppliedAValidYamlConfiguration_TheEndPointContainsARequestNode() { var config = BasicConfig; var processor = new YamlConfigurationProcessor(config); var result = processor.GetConfiguration().First(); Assert.NotNull(result.Request); }
public void GetConfiguration_WhenSuppliedAValidYamlConfiguration_TheRequestMethodIsCorrect() { var config = BasicConfig; var processor = new YamlConfigurationProcessor(config); var result = processor.GetConfiguration().First(); Assert.Equal("GET", result.Request.Method); }
public void GetConfiguration_WhenSuppliedAValidYamlConfiguration_ReturnsACollectionOfEndPoints() { var config = BasicConfig; var processor = new YamlConfigurationProcessor(config); var result = processor.GetConfiguration(); Assert.NotNull(result); }
public void GetConfiguration_WhenSuppliedAValidYamlConfiguration_ReturnsTheCorrectNumberOfEndPoints() { var config = BasicConfig; var processor = new YamlConfigurationProcessor(config); var result = processor.GetConfiguration(); Assert.Single(result); }
public void GetConfiguration_WhenSuppliedAConfigurationWthAJsonBody_TheResponseBodyIsCorrect() { var config = JsonConfig; var processor = new YamlConfigurationProcessor(config); var result = processor.GetConfiguration().First(); Assert.Equal(@"{""name"":""Bob""}", result.Response.Body); }
public void GetConfiguration_WhenSuppliedAValidYamlConfiguration_TheResponseStatusIsCorrect() { var config = BasicConfig; var processor = new YamlConfigurationProcessor(config); var result = processor.GetConfiguration().First(); Assert.Equal(200, result.Response.Status); }
public void GetConfiguration_WhenSuppliedAValidYamlConfiguration_TheRequestFilePathIsCorrect() { var config = BasicConfig; var processor = new YamlConfigurationProcessor(config); var result = processor.GetConfiguration().First(); Assert.Equal("homePageRequest.xml", result.Request.File); }
public void GetConfiguration_WhenSuppliedAValidYamlConfiguration_TheRequestPostDataIsCorrect() { var config = BasicConfig; var processor = new YamlConfigurationProcessor(config); var result = processor.GetConfiguration().First(); Assert.Equal("name=Bob&[email protected]", result.Request.Post); }
public void GetConfiguration_WhenSuppliedAValidYamlConfiguration_TheResponseHeadersAreCorrect(string name, string value) { var config = BasicConfig; var processor = new YamlConfigurationProcessor(config); var result = processor.GetConfiguration().First(); Assert.True(result.Response.Headers.ContainsKey(name)); Assert.Equal(value, result.Response.Headers[name]); }