This repository has been archived by the owner on Jul 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
serialize ExecutionContext before sending it to the appdomain, #136
- Loading branch information
Showing
14 changed files
with
261 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// Copyright 2015 ThoughtWorks, Inc. | ||
// | ||
// This file is part of Gauge-CSharp. | ||
// | ||
// Gauge-CSharp is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// Gauge-CSharp is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with Gauge-CSharp. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
using Gauge.CSharp.Runner.Processors; | ||
using Gauge.Messages; | ||
using NUnit.Framework; | ||
|
||
namespace Gauge.CSharp.Runner.IntegrationTests | ||
{ | ||
public class HookExecutionProcessorTests : IntegrationTestsBase | ||
{ | ||
[Test] | ||
public void ShouldPasssExecutionContextToHook() | ||
{ | ||
var sandbox = SandboxBuilder.Build(); | ||
var stepExecutionStartingProcessor = new StepExecutionStartingProcessor(new MethodExecutor(sandbox)); | ||
|
||
var message = new Message | ||
{ | ||
MessageId = 1234, | ||
MessageType = Message.Types.MessageType.StepExecutionStarting, | ||
StepExecutionStartingRequest = new StepExecutionStartingRequest | ||
{ | ||
CurrentExecutionInfo = new ExecutionInfo | ||
{ | ||
CurrentSpec = new SpecInfo { Name = "Foo Spec" }, | ||
CurrentScenario = new ScenarioInfo { Name = "Foo Scenario" }, | ||
CurrentStep = new StepInfo | ||
{ | ||
Step = new ExecuteStepRequest | ||
{ | ||
ParsedStepText = "Foo Step", | ||
ActualStepText = "Foo Step" | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
var result = stepExecutionStartingProcessor.Process(message); | ||
|
||
AssertRunnerDomainDidNotLoadUsersAssembly(); | ||
var protoExecutionResult = result.ExecutionStatusResponse.ExecutionResult; | ||
Assert.IsNotNull(protoExecutionResult); | ||
Assert.IsFalse(protoExecutionResult.Failed); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.