public bool ConfigureSearchRoute(Configuration newConfig) { bool success = false; InfinityEngine.Business.InfinityEngine infinityEngine = new InfinityEngine.Business.InfinityEngine(); success = infinityEngine.SaveSearchRoute(newConfig); return success; }
public void TestSaveNewSearchRoute() { Configuration config = new Configuration(); config.AutoCompleteRoute = "testRoute"; config.MaxResults = 100; config.RecordIndentifier = "code"; config.UpdateURL = "http://urltoupdatefrom"; InfinityEngine.Business.InfinityEngine infinityEngine = new InfinityEngine.Business.InfinityEngine(); infinityEngine.SaveSearchRoute(config); BasicRedisClientManager pooledClientManager = RedisClientManager.get(); using (IRedisClient redisClient = pooledClientManager.GetClient()) { Configuration redisConfig = redisClient.Get<Configuration>(config.AutoCompleteRoute); Assert.IsTrue(redisConfig.AutoCompleteRoute.Equals(config.AutoCompleteRoute)); } }