public void TestGetByApplication_WhenHasValuesForApplication()
        {
            IList <ToggleValueDbEntity> mockedToggleValueDbEntities = this.CreateMockedToggleValueDbEntities();
            var mockOfTogglesDbContext          = new MockOfTogglesDbContext(mockedToggleValueDbEntities);
            var toggleValuesReadRepository      = new ToggleValuesReadRepository(mockOfTogglesDbContext.Object);
            ClientApplication clientApplication = this.CreateClientApplicationThatHasValues();

            IList <ToggleValue> result = toggleValuesReadRepository.GetByApplication(clientApplication);

            Assert.IsTrue(result.Count > 0);
            Assert.IsTrue(this.AreAllToggleIdsInResult(mockedToggleValueDbEntities, result));
        }
        public void TestGetByApplication_ReturnsOnlyGlobalValuesWhenApplicationDoesNotHaveValues()
        {
            IList <ToggleValueDbEntity> mockedToggleValueDbEntities = this.CreateMockedToggleValueDbEntities();
            var mockOfTogglesDbContext          = new MockOfTogglesDbContext(mockedToggleValueDbEntities);
            var toggleValuesReadRepository      = new ToggleValuesReadRepository(mockOfTogglesDbContext.Object);
            ClientApplication clientApplication = this.CreateClientApplicationThatDoesNotHaveValues();

            IList <ToggleValue> result = toggleValuesReadRepository.GetByApplication(clientApplication);

            Assert.IsTrue(result.Count > 0);
            Assert.IsTrue(AreOnlyGlobalValuesInResult(mockedToggleValueDbEntities, result));
            Assert.IsTrue(AreAllGlobalValuesInResult(mockedToggleValueDbEntities, result));
        }