Bugfix: Force build with parameters when using WebURL

I'll refactor it as an example and show you what I mean as I have more
tests to add to this fixture

On Sat, Oct 4, 2014 at 3:30 AM, Nate Tovo <notifications@github.com> wrote:

> In JenkinsTransport.UnitTests/JenkinsProjectManagerTests.cs:
>
> > @@ -36,5 +61,35 @@ public void TestInstanciation()
> >              Assert.AreEqual(Manager.Settings.Server, "https://builds.apache.org/");
> >          }
> >
> > +        [TestMethod]
> > +        public void ForceBuild_when_using_weburl_should_call_api_with_parameters()
> > +        {
> > +            Mock<IWebRequestFactory> mockWebRequestFactory;
> > +            Mock<IJenkinsApiFactory> mockJenkinsApiFactory;
> > +            Mock<IJenkinsApi> mockApi;
> > +
> > +            var target = CreateTestTarget(out mockWebRequestFactory, out mockJenkinsApiFactory, out mockApi);
>
> 3 out parameters feels like the wrong approach here. What about
> refactoring the Setup to set new protected Mock IWebRequestFactory,
> IJenkinsApiFactory, and IJenkinsApi properties. Then you can write this
> test against the protected Manager instead of a new target as well.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/csnate/cctray-jenkins-transport/pull/5/files#r18397871>
> .
>