public void Select_IsSonarCloud_ReturnsSonarCloudFactory() { var logger = new TestLogger(); var testSubject = new RequestFactorySelector(); var actual = testSubject.Select(isSonarCloud: true, logger); actual.Should().BeOfType <UnversionedRequestFactory>(); var actualRequest = actual.Create <IGetVersionRequest>(new ServerInfo(new Version(8, 0), ServerType.SonarCloud)); actualRequest.Should().NotBeNull(); }
public void Select_IsSonarQube_ReturnsSonarQubeFactory() { var logger = new TestLogger(); var testSubject = new RequestFactorySelector(); var actual = testSubject.Select(isSonarCloud: false, logger); // Should be a configure SonarQube request factory actual.Should().BeOfType <RequestFactory>(); var actualRequest = actual.Create <IGetVersionRequest>(new ServerInfo(new Version(6, 7), ServerType.SonarQube)); actualRequest.Should().NotBeNull(); }