public MockHeroApi( IInteropService interopService, ILogger logger) { _interopService = interopService; _logger = logger; }
public HeroApi( IInteropService interopService, ILogger logger, HttpClient httpClient, Blazored.LocalStorage.ILocalStorageService LocalStore) { _interopService = interopService; _logger = logger; _httpClient = httpClient; _LocalStore = LocalStore; }
public MainViewModel(ISettingsService settings, IInteropService interop) { if (settings == null) { throw new ArgumentNullException("settings"); } if (interop == null) { throw new ArgumentNullException("interop"); } _settings = settings; _interop = interop; _id = "Hatter's Move Window Helper".GetHashCode(); }
/// <summary> /// Execute this test /// </summary> /// <param name="ut">Test</param> public void ExecuteTest(VMUT ut) { foreach (var test in ut.Tests) { // Interop service IInteropService service = null; // Message provider IScriptContainer scriptContainer = null; if (test.Message != null) { scriptContainer = new ManualMessageProvider(test.Message); } // Script table ManualScriptTable scriptTable = null; if (test.ScriptTable != null) { scriptTable = new ManualScriptTable(); foreach (var script in test.ScriptTable) { scriptTable.Add(script.Script); } } // Create engine using (var engine = new ExecutionEngine(scriptContainer, Crypto.Default, scriptTable, service)) { engine.LoadScript(test.Script); // Execute Steps if (test.Steps != null) { foreach (var step in test.Steps) { // Actions if (step.Actions != null) { foreach (var run in step.Actions) { switch (run) { case VMUTActionType.Execute: engine.Execute(); break; case VMUTActionType.StepInto: engine.StepInto(); break; case VMUTActionType.StepOut: engine.StepOut(); break; case VMUTActionType.StepOver: engine.StepOver(); break; } } } // Review results var add = string.IsNullOrEmpty(step.Name) ? "" : "-" + step.Name; AssertResult(engine, step.Result, $"{ut.Category}-{ut.Name}-{test.Name}{add}: "); } } } } }
public BrowserLogger(IInteropService interop) { _interop = interop; }