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; } }
public void Init() { _clientMock = new Mock <IRestClient>(); _config = new InitialSetup().Config; }
public void Test_When_Any_Of_Ctor_Params_Is_Null_Then_Throw_Exception(IRestClient client, NovaPoshtaConfig config) { ((Action)(() => new JsonLogic(client, config))).ShouldThrowExactly <ArgumentNullException>(); }