public IdexRepositoryPublicTests() { IFileRepository _fileRepo = new FileRepository.FileRepository(); Dictionary <string, string> configData = null; if (_fileRepo.FileExists(configPath)) { configData = _fileRepo.GetDataFromFile <Dictionary <string, string> >(configPath); } if (configData != null) { _address = configData["publicKey"]; } _repo = new IdexRepository(); }
public IdexRepositoryAuthTests() { IFileRepository _fileRepo = new FileRepository.FileRepository(); Dictionary <string, string> configData = null; var privateKey = string.Empty; if (_fileRepo.FileExists(configPath)) { configData = _fileRepo.GetDataFromFile <Dictionary <string, string> >(configPath); } if (configData != null) { privateKey = configData["privateKey"]; } if (!string.IsNullOrEmpty(privateKey)) { _repo = new IdexRepository(privateKey); _address = _repo.GetAddress(); } else { _repo = new IdexRepository(); } }