public async Task State_FallsThrough() { var fixture = MocksHelper.AugmenterBase(CreateCommonConfiguration()); var model = new TestModelC(); var someValue = "bars"; await fixture.AugmentAsync(model, addState : state => { state.Add("key", someValue); }); fixture.Contexts.First().State["key"].Should().Be(someValue); }
public async Task SupportsArrays() { var fixture = MocksHelper.AugmenterBase(CreateCommonConfiguration()); var arr = new TestModelC[] { new TestModelC(), new TestModelC() }; await fixture.AugmentAsync(arr); fixture.Contexts.Should().HaveCount(arr.Length); var context = fixture.Contexts.First(); context.Type.Should().Be(typeof(TestModelC)); context.TypeConfiguration.Type.Should().Be(typeof(TestModelC)); }