Ejemplo n.º 1
0
        public void LoadConfigurationTest()
        {
            // loading the instance of loader .. from constructor there is a bad path to file coz it is a path from "ConfigurationLoader" class
            var loader = ConfigurationLoader.GetInstance();
            // getting the correct path from this test
            var path = Directory.GetParent(Directory.GetParent(Directory.GetParent(Directory.GetParent(System.IO.Directory.GetCurrentDirectory()).ToString()).ToString()).ToString());

            loader.LoadConfigurationData(path + "/configuration.txt");

            var host = new byte[] { 127, 0, 0, 1 };
            var port = 7777;

            Assert.Equal(host, loader.DatabaseHost);
            Assert.Equal(port, loader.DatabasePort);
        }
Ejemplo n.º 2
0
 public OppropDataService()
 {
     System.Configuration.Configuration configuration =
         ConfigurationLoader.GetInstance().GetConfigurationForRunningProcess();
     m_inputPath = ConfigurationLoader.GetAppSettingsValue("OppRopDataPath");
 }
Ejemplo n.º 3
0
 public static Configuration ProvideConfiguration()
 {
     return(ConfigurationLoader.GetInstance().Configuration);
 }