Exemplo n.º 1
0
        public void ListOfActiveBlockEntriesDoesNotShowEntriesWithDisabledProfiles()
        {
            //Arrange
            DoSetupWithUnlockingAndBasicHostFileWithUcosl();
            CreateHostFileWithSampleContent();
            _ucosl.AddAllLinesFromHostFileIntoEntryList();
            CreateProfileViewWithAddedEnAndDisabledEntry();
            var userConfiguration = Application.UI.MainView.UserConfiguration;

            //Act
            userConfiguration.ProfileList[0].ProfileIsEnabled = false;
            var result = UserConfigurationOnSystemLevel.GetListOfActiveBlockEntries(userConfiguration);

            //Assert
            result.Count.Should().Be(0);
        }
Exemplo n.º 2
0
        public void GetCorrectListOfActiveBlockEntries()
        {
            //Arrange
            DoSetupWithUnlockingAndBasicHostFileWithUcosl();
            CreateHostFileWithSampleContent();
            _ucosl.AddAllLinesFromHostFileIntoEntryList();
            CreateProfileViewWithAddedEnAndDisabledEntry();
            var userConfiguration = Application.UI.MainView.UserConfiguration;

            //Act
            var result = UserConfigurationOnSystemLevel.GetListOfActiveBlockEntries(userConfiguration);

            //Assert
            result.Count.Should().Be(1);
            result[0].Should().Be(_activatedEntry.Url);
        }