public void TestBind() { var config = new ConfigProvider(); config["orderRedis"] = "server=127.0.0.1:6379;password=pass;db=7"; var rds = new Redis(); config.Bind(rds, true, "orderRedis"); Assert.Equal("127.0.0.1:6379", rds.Server); Assert.Equal("pass", rds.Password); Assert.Equal(7, rds.Db); config["orderRedis"] = "server=10.0.0.1:6379;password=word;db=13"; config.SaveAll(); Assert.Equal("10.0.0.1:6379", rds.Server); Assert.Equal("word", rds.Password); Assert.Equal(13, rds.Db); }