public void TestTesterTest() { var iMockCheckerMock = Substitute.For<IMockChecker>(); iMockCheckerMock.GetAppendedText("1").Returns("12"); UnitTestCheck check = new UnitTestCheck(); Assert.AreEqual(check.TestCaseChecker(iMockCheckerMock), "123"); }
public async Task <CommandResult> Handle(LoginCheckProdCommand request, CancellationToken cancellationToken) { var path = @"E:\Vodolazkiy\autodocautotest\AutodocAutoTests\bin\Debug\AutodocAutoTest.dll"; var testName = "AutodocAutoTest.TestsCases.Login"; var result = new CommandResult { Success = true }; var check = new UnitTestCheck(_processor); result.CheckModel = await check.RunNUnitTest(request.CheckSettings, testName, path); return(result); }
public async Task <CommandResult> Handle(ExampleUnitTestCheckProdCommand request, CancellationToken cancellationToken) { var path = @"E:\Vodolazkiy\test\UnitTestsSolution\UnitTestsProject"; var testName = "TestMethodPositive"; var result = new CommandResult { Success = true }; var check = new UnitTestCheck(_processor); result.CheckModel = await check.RunMsUnitTest(request.CheckSettings, testName, path); //result.CheckModel.State.Status = StatusesEnum.CRITICAL;//test return(result); }