Example #1
0
        private void SetCfg()
        {
            string path = $"{Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)}\\cfg\\novaposhta.json";

            try
            {
                using (var r = new StreamReader(path))
                {
                    var json = r.ReadToEnd();
                    Config = JsonConvert.DeserializeObject <NovaPoshtaConfig>(json);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }
        }
Example #2
0
 public void Init()
 {
     _clientMock = new Mock <IRestClient>();
     _config     = new InitialSetup().Config;
 }
Example #3
0
 public void Test_When_Any_Of_Ctor_Params_Is_Null_Then_Throw_Exception(IRestClient client, NovaPoshtaConfig config)
 {
     ((Action)(() => new JsonLogic(client, config))).ShouldThrowExactly <ArgumentNullException>();
 }