public void RetrieveConfig() { FakeConfig Config = new FakeConfig(); FakeConfig RetrievedConfig = ConfigMapper.Get <FakeConfig>(); if (Config.Test == RetrievedConfig.Test) { Assert.Fail(); } }
public void TestPresistance() { FakeConfig Config = ConfigMapper.Get <FakeConfig>(false); Assert.IsFalse(ConfigMapper.Configs.ContainsKey(Config.GetType()), "Presistance avoidance failed"); Config = (FakeConfig)ConfigMapper.Get(typeof(FakeConfig), false); Assert.IsFalse(ConfigMapper.Configs.ContainsKey(Config.GetType()), "Presistance avoidance failed"); Config = ConfigMapper.Get <FakeConfig>(); Assert.IsTrue(ConfigMapper.Configs.ContainsKey(Config.GetType()), "Presistance failed"); }