Exemplo n.º 1
0
        public void GetEnabledRemoteNames_returns_enabled_remotes_only()
        {
            string enabledRemoteName  = "enabledRemote";
            string disabledRemoteName = "disabledRemote";

            _module.GetRemoteNames().Returns(x => new[] { enabledRemoteName, });

            var sections = new List <IConfigSection> {
                new ConfigSection($"{GitRemoteManager.DisabledSectionPrefix}{GitRemoteManager.SectionRemote}.{disabledRemoteName}", true)
            };

            _configFile.GetConfigSections().Returns(x => sections);

            var enabledRemoteNames = _controller.GetEnabledRemoteNames();

            Assert.AreEqual(1, enabledRemoteNames.Count);
            Assert.AreEqual(enabledRemoteName, enabledRemoteNames[0]);
        }