BetterCms.Test.Module.Root.ServiceTests.DefaultOptionServiceTests.Should_Return_MergedOptionsSuccessfully C# (CSharp) Метод

Should_Return_MergedOptionsSuccessfully() приватный Метод

private Should_Return_MergedOptionsSuccessfully ( ) : void
Результат void
        public void Should_Return_MergedOptionsSuccessfully()
        {
            var optionValue1 = TestDataProvider.CreateNewPageOption();
            var optionValue2 = TestDataProvider.CreateNewPageOption();
            var optionValue3 = TestDataProvider.CreateNewPageOption();

            optionValue1.Type = optionValue2.Type = optionValue3.Type = OptionType.Text;
            
            optionValue3.Value = null;
            var service = CreateOptionService();
            var optionValues = new List<IOptionValueEntity> { optionValue1, optionValue2, optionValue3 };
            var options = new List<IOptionEntity>();

            var result = service.GetMergedOptionValues(options, optionValues);
            Assert.NotNull(result);
            Assert.AreEqual(result.Count, 3);
            Assert.AreEqual(2, result.Count(o => o.Value != null));
        }