public void ShouldParseSuccess(string input, string provider, string pack, string name, string version) { IActionNameResolveService actionNameResolveService = this.GetRequiredService <IActionNameResolveService>(); IActionName actionName = actionNameResolveService.ResolverName(input); actionName.Provider.Should().Be(provider); actionName.Pack.Should().Be(pack); actionName.Name.Should().Be(name); actionName.Version.Should().Be(version); }
public void ShouldThrowActionException(string input) { IActionNameResolveService actionNameResolveService = this.GetRequiredService <IActionNameResolveService>(); Action action = () => { actionNameResolveService.ResolverName(input); }; var exp = Assert.ThrowsException <ActionException>(() => { IActionName actionName = actionNameResolveService.ResolverName(input); }); action.Should().Throw <ActionException>() .And.ErrorCode.Should().Be(nameof(ErrorCodes.InvalidActionName)); }
public DefaultActionExecuter( ILogger <DefaultActionExecuter> logger, ITraceService traceService, IActionMetaService metaService, IActionRuntimeService runtimeService, IPreparePackService preparePackService, IActionNameResolveService actionNameResolveService, IDictionary <string, IActionFactoryService> actionFactoryMap, IServiceProvider serviceProvider) { this.serviceProvider = serviceProvider; this.logger = logger; this.traceService = traceService; this.runtimeService = runtimeService; this.metaService = metaService; this.actionNameResolveService = actionNameResolveService; this.preparePackService = preparePackService; this.actionFactoryMap = actionFactoryMap; }