-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #145 from jibedoubleve/issue_144
Issue 144
- Loading branch information
Showing
2 changed files
with
45 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using FluentAssertions; | ||
using Lanceur.Core.Managers; | ||
using Lanceur.Core.Models; | ||
using Lanceur.Core.Services; | ||
using Lanceur.Infra.Managers; | ||
using Lanceur.Macros; | ||
using NSubstitute; | ||
using Xunit; | ||
|
||
namespace Lanceur.Tests.Functional | ||
{ | ||
public class ExecutionManagerShould | ||
{ | ||
#region Methods | ||
|
||
[Fact] | ||
public async Task ExecuteMultiMacro() | ||
{ | ||
var mgr = new ExecutionManager( | ||
Substitute.For<IAppLoggerFactory>(), | ||
Substitute.For<IWildcardManager>(), | ||
Substitute.For<IDataService>() | ||
); | ||
|
||
var macro = Substitute.For<MultiMacro>(); | ||
await macro.ExecuteAsync( | ||
Arg.Do<Cmdline>( | ||
x => x.Should().NotBeNull() | ||
) | ||
); | ||
|
||
var request = new ExecutionRequest | ||
{ | ||
Cmdline = new Cmdline("ini", "thb@joplin@spotify"), | ||
ExecuteWithPrivilege = false, | ||
QueryResult = macro | ||
}; | ||
|
||
await mgr.ExecuteAsync(request); | ||
} | ||
|
||
#endregion Methods | ||
} | ||
} |