示例#1
0
        public void InitializeMocksAndService()
        {
            string jsonConfigRawData = null;

            using (StreamReader r = new StreamReader("./MockData/config.json"))
            {
                jsonConfigRawData = r.ReadToEnd();
            }
            _configDic = JsonConvert.DeserializeObject <IDictionary <string, string> >(jsonConfigRawData);
            string rawMockData = null;

            using (StreamReader r = new StreamReader("./MockData/mockClients.json"))
            {
                rawMockData = r.ReadToEnd();
            }
            var clients = JsonConvert.DeserializeObject <IDictionary <string, IList <ClientInfoEntity> > >(rawMockData);

            _clientInfoList       = clients.FirstOrDefault().Value;
            _clientInfoRepository = new ClientInfoInMemoryRepository();
            _clientInfoRepository.Seed(_clientInfoList);
            _configService = new ConfigurationService(_configDic);
            _searchService = new SearchService(_configService);
        }
 public void InitializeMocksAndRepo()
 {
     _clientInfoRepository = new ClientInfoInMemoryRepository();
     _clientInfoRepository.Seed(produceMocks());
     _comparisonService = new ComparisonService();
 }
 public void ClientInfo_Seed_ExceptionExpected_TestMethod()
 {
     _clientRepo.Seed(null);
 }