public void ReturnCorrectArtifactDirectoryFromCorrectProjectFromCorrectServer() { string artifactDirectory = @"c:\ArtifactDirectory"; MockRepository mocks = new MockRepository(MockBehavior.Default); ServerAggregatingCruiseManagerWrapper serverWrapper = InitialiseServerWrapper(mocks, delegate(CruiseServerClientBase manager) { Mock.Get(manager).Setup(_manager => _manager.GetArtifactDirectory(It.IsAny <string>())) .Returns(artifactDirectory); }); Assert.AreEqual(artifactDirectory, serverWrapper.GetArtifactDirectory(projectSpecifier, null)); }
public void ReturnCorrectArtifactDirectoryFromCorrectProjectFromCorrectServer() { string artifactDirectory = @"c:\ArtifactDirectory"; MockRepository mocks = new MockRepository(); ServerAggregatingCruiseManagerWrapper serverWrapper = InitialiseServerWrapper(mocks, delegate(CruiseServerClientBase manager) { SetupResult.For(manager.GetArtifactDirectory(null)) .IgnoreArguments() .Return(artifactDirectory); }); mocks.ReplayAll(); Assert.AreEqual(artifactDirectory, serverWrapper.GetArtifactDirectory(projectSpecifier, null)); }