Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (22 sloc) 674 Bytes
using System;
using System.Configuration;
using System.IO;
using NUnit.Framework;
namespace NUnitTestDemo
{
[ExpectPass]
public class ConfigFileTests
{
[Test]
public static void ProperConfigFileIsUsed()
{
var expectedPath = Path.Combine(TestContext.CurrentContext.TestDirectory, "CSharpTestDemo.dll.config");
Assert.That(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile, Is.EqualTo(expectedPath));
}
[Test]
public static void CanReadConfigFile()
{
Assert.That(ConfigurationManager.AppSettings.Get("test.setting"), Is.EqualTo("54321"));
}
}
}
You can’t perform that action at this time.