public void TestSetup() { m_cache = new FeatureCacheBase(); m_cache.LoadFromList(m_fNames.Select(n => new Feature { Name = n })); //// Create a bunch of features and add them to the feature cache. //int bit = 0; //foreach (string name in m_fNames) //{ // var feat = new Feature { Name = name }; // ReflectionHelper.SetProperty(feat, "Bit", bit++); // string cleanName = ReflectionHelper.GetStrResult(m_cache.GetType(), "CleanUpFeatureName", name); // m_cache.Add(cleanName, feat); //} }
public void CleanUpFeatureName_SendUntrimmedName_TrimsName() { Assert.AreEqual("UGLY FEATURE", FeatureCacheBase.CleanUpFeatureName("[ UGLY FEATURE ]")); }
public void CleanUpFeatureName_SendCleanName_ReturnsInput() { Assert.AreEqual("UGLY FEATURE", FeatureCacheBase.CleanUpFeatureName("UGLY FEATURE")); }
public void CleanUpFeatureName_SendBracketedName_RemovesBrackets() { Assert.AreEqual("UGLY FEATURE", FeatureCacheBase.CleanUpFeatureName("[UGLY FEATURE]")); }