public void OpenInBrowserTest() { var processstarter = Substitute.For <IProcessStarter>(); var vstsRelease = new VSTSRelease_v1 { Url = "account", Project = "project", DefinitionId = 1 }; var openVstsReleasePage = new OpenVstsReleasePage(processstarter); openVstsReleasePage.Handle(vstsRelease); var expected = "https://account.visualstudio.com/project/_release?definitionId=1&_a=releases"; processstarter.Received().Start(expected); }
public async Task OpenVstsReleaseWebPage() { var ps = Substitute.For <IProcessStarter>(); var release = new VSTSRelease_v1 { Account = "account", Project = "project", DefinitionId = 1 }; var request = OpenWebPageRequest.Create(release); var handler = new OpenVstsReleasePage(ps); await handler.Handle(request, CancellationToken.None); var expected = "https://account.visualstudio.com/project/_release?definitionId=1&_a=releases"; ps.Received().Start(expected); }