Example #1
0
        public async Task SaveDefinitionMakesPostCallWithYamlInBodyAndFileNameInCustomHeader()
        {
            string expectedYaml         = NewRandomString();
            string expectedYamlFileName = NewRandomString();

            GivenTheStatusCode("datasets/data-definitions", HttpStatusCode.OK, HttpMethod.Post, "yaml-file", expectedYamlFileName);

            HttpStatusCode statusCode = await _client.SaveDefinition(expectedYaml, expectedYamlFileName);

            statusCode
            .Should()
            .Be(HttpStatusCode.OK);

            AndTheRequestContentsShouldHaveBeen(expectedYaml);
        }