コード例 #1
0
ファイル: VstsReleaseTests.cs プロジェクト: berinder/Plugins
        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);
        }
コード例 #2
0
        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);
        }