/Mercurial.Net.Tests/ConfigurationTests.cs
C# | 39 lines | 35 code | 4 blank | 0 comment | 0 complexity | ca59968651eb01722c3b71a855460260 MD5 | raw file
Possible License(s): BSD-3-Clause, GPL-2.0
- using System.Collections.Generic;
- using System.Linq;
- using NUnit.Framework;
-
- namespace Mercurial.Tests
- {
- [TestFixture]
- public class ConfigurationTests
- {
- [TestCase("ui")]
- [TestCase("extensions")]
- [Test]
- [Category("Integration")]
- public void Sections_ReturnsCollectionOfSectionNames_ContainingAtLeastAFewOfTheDefaultOnes(string sectionName)
- {
- IEnumerable<string> sectionNames = ClientExecutable.Configuration.Sections;
-
- Assert.That(sectionNames.Contains(sectionName), Is.True);
- }
-
- [TestCase("ui", "username")]
- [TestCase("extensions", "graphlog")]
- [Test]
- [Category("Integration")]
- public void Entries_ForSpecifiedTypicalOnes_Exists(string sectionName, string name)
- {
- Assert.That(ClientExecutable.Configuration.ValueExists(sectionName, name), Is.True);
- }
-
- [TestCase("dummysection", "username")]
- [TestCase("ui", "dummyname")]
- [Test]
- [Category("Integration")]
- public void Entries_ForRandomlyGeneratedNames_DoesNotExist(string sectionName, string name)
- {
- Assert.That(ClientExecutable.Configuration.ValueExists(sectionName, name), Is.False);
- }
- }
- }