Exemplo n.º 1
0
        public async Task ResolveLicenseCodeMIT()
        {
            const string Url = "https://licenses.nuget.org/MIT";

            _mockHttp
            .When(HttpMethod.Get, Url)
            .Respond(
                MediaTypeNames.Text.Html,
                TempFile.OpenResource(GetType(), "NuGetApiTest.MIT.html"));

            var actual = await _sut.ResolveLicenseCodeAsync(Url, CancellationToken.None);

            actual.ShouldBe("MIT");
        }