コード例 #1
0
        public void WriteConfiguration_CustomConfiguration_ReloadIsSuccess()
        {
            // Define the configuration we want to write.
            var config = new ServerConfiguration()
            {
                CategoryList = new List <ServerCategory>()
                {
                    new ServerCategory()
                    {
                        ServerList = new List <Server>()
                        {
                            new Server()
                            {
                                Name = "testserver1"
                            }
                        }
                    }
                }
            };

            _manager.WriteConfiguration(config);

            // Load the last writen configuration
            var loadedConfig = _manager.LoadConfiguration();

            Assert.IsNotNull(loadedConfig);
            Assert.IsTrue(loadedConfig.CategoryList.First().ServerList.First().Name.Equals("testserver1"));
        }