////public void Chain<TParent, TChild>(Func<TParent, TChild> expression) where TParent : class where TChild : class ////{ //// Dep<TParent>().Stub(expression).Return(Dep<TChild>()); ////} protected override void SetUpInner() { base.SetUpInner(); AutoFixture.Customize(new AutoMoqCustomization()); AutoFixture.Behaviors.Add(new OmitOnRecursionBehavior()); AutoFixture.Customize <TSut>(o => o.FromFactory(new MethodInvoker(new GreedyConstructorQuery()))); }
public async Task TestEmitBatchAsync_WithEnabledTrue_ShouldInsertLogEvents(IEnumerable <LogEvent> logEvents) { //Arrange AutoFixture.Customize <BigQuerySinkOptions>(opt => opt.With(p => p.IsEnabled, true)); var connection = AutoFixture.Freeze <Mock <IConnection> >(); //Act var sut = AutoFixture.Create <SinkTest>(); await sut.TestEmitBatchAsync(logEvents); //Assert connection.Verify(mock => mock.CreateLogTableAsync(), Times.Once); connection.Verify(mock => mock.InsertLogEventsAsync(It.IsAny <IEnumerable <BigQueryLogEvent> >()), Times.Once); }
protected override void SetUpInner() { base.SetUpInner(); AutoFixture.Customize(new StrictAutoMoqCustomization()); }
protected void TurnOnAutoMoq() { AutoFixture.Customize(new AutoMoqCustomization()); }