public void Create_returns_HttpClient_if_requested(HttpClientSpecimenBuilder <TestWebSite.Startup> sut, IFixture fixture)
        {
            fixture.Inject(new WebApplicationFactory <TestWebSite.Startup>().WithWebHostBuilder(b => b.UseSolutionRelativeContentRoot("")));

            var result = sut.Create(typeof(HttpClient), fixture.Create <SpecimenContext>());

            Assert.That(result, Is.InstanceOf <HttpClient>());
        }
        public void Create_returns_NoSpecimen_if_request_is_invalid(HttpClientSpecimenBuilder <TestWebSite.Startup> sut, SpecimenContext context)
        {
            var result = sut.Create(typeof(object), context);

            Assert.That(result, Is.InstanceOf <NoSpecimen>());
        }
        public void RequestSpecification_exposes_passed_specification(IRequestSpecification requestSpecification)
        {
            var sut = new HttpClientSpecimenBuilder <TestWebSite.Startup>(requestSpecification);

            Assert.That(sut.RequestSpecification, Is.SameAs(requestSpecification));
        }
        public void Default_RequestSpecification_is_HttpClientRequestSpecification()
        {
            var sut = new HttpClientSpecimenBuilder <TestWebSite.Startup>();

            Assert.That(sut.RequestSpecification, Is.InstanceOf <HttpClientRequestSpecification>());
        }
        public void Create_returns_HttpClient_if_requested(HttpClientSpecimenBuilder sut, SpecimenContext context)
        {
            var result = sut.Create(typeof(HttpClient), context);

            Assert.That(result, Is.InstanceOf <HttpClient>());
        }