public void GetsExternalLinks()
        {
            ExternalLink[] links = new ExternalLink[] { new ExternalLink("1", "2"), new ExternalLink("3", "4") };
            MockRepository mocks = new MockRepository(MockBehavior.Default);
            ServerAggregatingCruiseManagerWrapper serverWrapper = InitialiseServerWrapper(mocks,
                                                                                          delegate(CruiseServerClientBase manager)
            {
                Mock.Get(manager).Setup(_manager => _manager.GetExternalLinks(It.IsAny <string>()))
                .Returns(links);
            });

            Assert.AreEqual(links, serverWrapper.GetExternalLinks(projectSpecifier, null));
        }
예제 #2
0
        public void GetsExternalLinks()
        {
            ExternalLink[] links = new ExternalLink[] { new ExternalLink("1", "2"), new ExternalLink("3", "4") };
            MockRepository mocks = new MockRepository();
            ServerAggregatingCruiseManagerWrapper serverWrapper = InitialiseServerWrapper(mocks,
                                                                                          delegate(CruiseServerClientBase manager)
            {
                SetupResult.For(manager.GetExternalLinks(null))
                .IgnoreArguments()
                .Return(links);
            });

            mocks.ReplayAll();

            Assert.AreEqual(links, serverWrapper.GetExternalLinks(projectSpecifier, null));
        }