public void Setup() { if (_session == null) { _session = new SynologySession(new AppSettingsClientConfig()); _session.Login(); _api = new SynologyApi(_session); } }
public ApiTests() { var executingAssembly = new FileInfo(Assembly.GetExecutingAssembly().FullName); _localTestFolderNoSlash = executingAssembly.DirectoryName + "\\TestFiles"; _localTestImage = _localTestFolderNoSlash + "\\image\\synologybox.jpg"; _md5TestImage = _localTestFolderNoSlash + "\\image\\md5test.jpg"; _synoTestFolderNoSlash = WebConfigurationManager.AppSettings.Get("Syno.TestFolder"); if (string.IsNullOrWhiteSpace(_synoTestFolderNoSlash)) { throw new ConfigurationErrorsException("No Syno.TestFolder in app config found or value is empty"); } _session = new SynologySession(new AppSettingsClientConfig()); _session.Login(); _api = new SynologyApi(_session); }