Пример #1
0
        /// <inheritdoc />
        public TDataProviderTestBuilder ContainingEntry(Action <IDataProviderEntryKeyTestBuilder> dataProviderEntryTestBuilder)
        {
            var newDataProviderEntryBuilder = new DataProviderEntryTestBuilder(this.TestContext, this.DataProviderName);

            dataProviderEntryTestBuilder(newDataProviderEntryBuilder);

            var key = newDataProviderEntryBuilder.GetDataProviderEntryKey();

            this.ContainingEntryWithKey(key);

            var actualEntry = this.DataProvider[key];

            newDataProviderEntryBuilder
            .GetDataProviderEntryValidations()
            .ForEach(v => v(actualEntry));

            return(this.DataProviderTestBuilder);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="DataProviderEntryDetailsTestBuilder{TValue}"/> class.
 /// </summary>
 /// <param name="dataProviderEntryTestBuilder">Test builder of <see cref="DataProviderEntryTestBuilder"/> type.</param>
 public DataProviderEntryDetailsTestBuilder(DataProviderEntryTestBuilder dataProviderEntryTestBuilder)
     : base(dataProviderEntryTestBuilder.TestContext)
 {
     CommonValidator.CheckForNullReference(dataProviderEntryTestBuilder, nameof(dataProviderEntryTestBuilder));
     this.dataProviderEntryTestBuilder = dataProviderEntryTestBuilder;
 }