public void Initialize()
        {
            var configuration = TestHelper.InitializeConfiguration("appsettings.json");

            Assert.IsNotNull(configuration);

            var generalSettings = GeneralSettingsBuilder.Build(configuration);

            var hrNewClientSettings = HrNewsClientSettingsBuilder.Build(configuration);

            Assert.IsNotNull(hrNewClientSettings);

            const string expectedUrl = "https://hacker-news.firebaseio.com/v0/";

            Assert.AreEqual(expectedUrl, hrNewClientSettings.HrNewsApiUrl);

            const string expectedConnectionString = "DefaultEndpointsProtocol=https;AccountName=hsbhrnewssa;AccountKey=0pJza+M3O0ynLUuiOFwFHje81cU9RlTOp1PbObbcrpFTYy8bk1ryibaWNd9PA5ey7CbBoQBgfITWuxWm+5bFvQ==;EndpointSuffix=core.windows.net";

            Assert.AreEqual(expectedConnectionString, generalSettings.AzureStorageConnectionString);

            _repo = new HrNewsRepository(generalSettings);

            Assert.IsNotNull(_repo);

            _service = new HrNewsWebApiService(hrNewClientSettings);

            Assert.IsNotNull(_service);
        }
Beispiel #2
0
        public void Initialize()
        {
            var configuration = TestHelper.InitializeConfiguration("appsettings.json");

            Assert.IsNotNull(configuration);

            var generalSettings = GeneralSettingsBuilder.Build(configuration);

            _repo = new HrNewsRepository(generalSettings);

            Assert.IsNotNull(_repo);

            _service = new HrNewsDataService(_repo);

            Assert.IsNotNull(_service);
        }