public void Creating_executor_with_runtime_determed_type_should_create_working_executor() { var mapper = new AttributeBasedCommandMapper(); var executor = new UoWMappedCommandExecutor(mapper); var command = new CorrectlyMappedCommand { Bar = 25, Foo = "Hello world" }; executor.Execute(command); TargetAggRoot.FooValue.Should().Be(command.Foo); TargetAggRoot.BarValue.Should().Be(command.Bar); }
public void Creating_executor_with_runtime_determed_type_should_create_working_executor() { var factory = new AttributeBasedMappingFactory(); var commandType = typeof(CorrectlyMappedCommand); var executor = factory.CreateExecutorForCommand(commandType); var command = new CorrectlyMappedCommand { Bar = 25, Foo = "Hello world" }; executor.Execute(command); TargetAggRoot.FooValue.Should().Be(command.Foo); TargetAggRoot.BarValue.Should().Be(command.Bar); }