Esempio n. 1
0
 public Task Execute_InvokesInner(Type type)
 => RunTestAsync(
     type,
     wrapper =>
 {
     wrapper.Initialize(CreateServiceProvider());
     return(wrapper.Execute(s_orchestrationContext, $"\"{Input}\""));
 },
     (wrapper, result) =>
 {
     result.Should().BeOneOf(Input, $"\"{Input}\"");
     InvokedContext.Should().BeOfType <WrapperOrchestrationContext>();
     InvokedInput.Should().BeOneOf(Input, $"\"{Input}\"");
 });
Esempio n. 2
0
 public void RaiseEvent_InvokesInner(Type type)
 => RunTest(
     type,
     wrapper =>
 {
     wrapper.Initialize(CreateServiceProvider());
     wrapper.RaiseEvent(s_orchestrationContext, Event, $"\"{Input}\"");
     return(true);
 },
     (wrapper, _) =>
 {
     EventRaised.Should().Be(Event);
     InvokedContext.Should().BeOfType <WrapperOrchestrationContext>();
     InvokedInput.Should().BeOneOf(Input, $"\"{Input}\"");
 });
 public Task Execute_InvokesInner(Type type)
 => RunTestAsync(
     type,
     wrapper =>
 {
     CreateScope();
     wrapper.InnerOrchestration =
         (TaskOrchestration)Activator.CreateInstance(wrapper.InnerOrchestrationType, this);
     return(wrapper.Execute(s_orchestrationContext, $"\"{Input}\""));
 },
     (wrapper, result) =>
 {
     result.Should().BeOneOf(Input, $"\"{Input}\"");
     InvokedContext.Should().Be(s_orchestrationContext);
     InvokedInput.Should().BeOneOf(Input, $"\"{Input}\"");
 });
 public void RaiseEvent_InvokesInner(Type type)
 => RunTest(
     type,
     wrapper =>
 {
     wrapper.InnerOrchestration =
         (TaskOrchestration)Activator.CreateInstance(wrapper.InnerOrchestrationType, this);
     wrapper.RaiseEvent(s_orchestrationContext, Event, $"\"{Input}\"");
     return(true);
 },
     (wrapper, _) =>
 {
     EventRaised.Should().Be(Event);
     InvokedContext.Should().Be(s_orchestrationContext);
     InvokedInput.Should().BeOneOf(Input, $"\"{Input}\"");
 });