Permalink
Browse files

changed more Condition to Conditional

  • Loading branch information...
1 parent d877b8f commit d0d0d1060b2e774cb7ab6e3fe8cc5789901ad44d Steve Moyer committed Dec 20, 2011
Showing with 11 additions and 11 deletions.
  1. +3 −3 nToggle/FeatureToggleFactory.cs
  2. +2 −2 nToggle/IFeatureToggleFactory.cs
  3. +6 −6 nToggleTest/FeatureToggleFactoryTest.cs
@@ -40,7 +40,7 @@ public IFeatureToggle GetFeatureToggle(string featureName, bool reversed)
return new FeatureToggle(reversed ? !statusFromRepository : statusFromRepository);
}
- public IConditionalFeatureToggle GetConditionFeatureToggle(string featureName, bool reversed)
+ public IConditionalFeatureToggle GetConditionalFeatureToggle(string featureName, bool reversed)
{
IFeatureToggle featureToggle = GetFeatureToggle(featureName, reversed);
@@ -60,9 +60,9 @@ public IFeatureToggle GetFeatureToggle(string featureName)
return GetFeatureToggle(featureName, false);
}
- public IConditionalFeatureToggle GetConditionFeatureToggle(string featureName)
+ public IConditionalFeatureToggle GetConditionalFeatureToggle(string featureName)
{
- return GetConditionFeatureToggle(featureName, false);
+ return GetConditionalFeatureToggle(featureName, false);
}
#endregion
@@ -4,7 +4,7 @@ public interface IFeatureToggleFactory
{
IFeatureToggle GetFeatureToggle(string featureName, bool reversed);
IFeatureToggle GetFeatureToggle(string featureName);
- IConditionalFeatureToggle GetConditionFeatureToggle(string featureName, bool reversed);
- IConditionalFeatureToggle GetConditionFeatureToggle(string featureName);
+ IConditionalFeatureToggle GetConditionalFeatureToggle(string featureName, bool reversed);
+ IConditionalFeatureToggle GetConditionalFeatureToggle(string featureName);
}
}
@@ -71,7 +71,7 @@ public void IsGlobalOnShouldReturnTrueWhenSetToTrueInConfig()
var featureName = "condition";
toggleGlobalSettingDictionary.Add(featureName, true);
toggleRepositoryDictionary.Add(featureName, repo.Object);
- Assert.IsTrue(factory.GetConditionFeatureToggle(featureName).IsGlobalOn);
+ Assert.IsTrue(factory.GetConditionalFeatureToggle(featureName).IsGlobalOn);
}
[Test]
@@ -80,7 +80,7 @@ public void IsGlobalOnShouldReturnTrueWhenSetToFalseInConfigAndNeedToBeReversed(
var featureName = "condition";
toggleGlobalSettingDictionary.Add(featureName, false);
toggleRepositoryDictionary.Add(featureName, repo.Object);
- Assert.IsTrue(factory.GetConditionFeatureToggle(featureName, true).IsGlobalOn);
+ Assert.IsTrue(factory.GetConditionalFeatureToggle(featureName, true).IsGlobalOn);
}
[Test]
@@ -89,7 +89,7 @@ public void IsGlobalOnShouldReturnFalseWhenSetToTrueInConfigAndNeedToBeReversed(
var featureName = "condition";
toggleGlobalSettingDictionary.Add(featureName, true);
toggleRepositoryDictionary.Add(featureName, repo.Object);
- Assert.IsFalse(factory.GetConditionFeatureToggle(featureName, true).IsGlobalOn);
+ Assert.IsFalse(factory.GetConditionalFeatureToggle(featureName, true).IsGlobalOn);
}
[Test]
@@ -98,19 +98,19 @@ public void IsGlobalOnShouldReturnFaleWhenSetToFalseInConfig()
var featureName = "condition";
toggleGlobalSettingDictionary.Add(featureName, false);
toggleRepositoryDictionary.Add(featureName, repo.Object);
- Assert.IsFalse(factory.GetConditionFeatureToggle(featureName).IsGlobalOn);
+ Assert.IsFalse(factory.GetConditionalFeatureToggle(featureName).IsGlobalOn);
}
[Test]
public void IsGlobalOnShouldReturnFaleWhenItIsNotSetInConfig()
{
- Assert.IsFalse(factory.GetConditionFeatureToggle("NotExist").IsGlobalOn);
+ Assert.IsFalse(factory.GetConditionalFeatureToggle("NotExist").IsGlobalOn);
}
[Test]
public void IsGlobalOnShouldReturnTrueWhenItIsNotSetInConfigAndNeedToBeReversed()
{
- Assert.IsTrue(factory.GetConditionFeatureToggle("NotExist", true).IsGlobalOn);
+ Assert.IsTrue(factory.GetConditionalFeatureToggle("NotExist", true).IsGlobalOn);
}
}
}

0 comments on commit d0d0d10

Please sign in to comment.