public void Test3_WcfHelper_ConfigurationManager_Key_Fails() { //arrange var key = @"Test3"; //var expected = @"Test3_Faild"; var result = string.Empty; //act var config = new WcfHelper.ConfigurationManager(typeof(OperationContextMock)); if (config.Configuration.HasFile) { try { result = config.AppSettings.Settings[key].Value; } catch (NullReferenceException) { return; } } //assert Assert.Fail(); }
public void Test2_WcfHelper_ConfigurationManager_Ok() { //arrange var key = @"Test2"; var expected = @"Test2_Right"; var result = string.Empty; //act var config = new WcfHelper.ConfigurationManager(typeof(OperationContextMock)); if (config.Configuration.HasFile) { result = config.AppSettings.Settings[key].Value; } //assert Assert.AreEqual(expected, result); }