File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
test/Microsoft.NET.Publish.Tests Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Licensed to the .NET Foundation under one or more agreements.
2
+ // The .NET Foundation licenses this file to you under the MIT license.
3
+
4
+ #nullable disable
5
+
6
+ using System . Runtime . CompilerServices ;
7
+ using Microsoft . DotNet . Cli . Utils ;
8
+
9
+ namespace Microsoft . NET . Publish . Tests
10
+ {
11
+ public class GivenThatWeWantToPublishAToolProject : SdkTest
12
+ {
13
+ public GivenThatWeWantToPublishAToolProject ( ITestOutputHelper log ) : base ( log )
14
+ {
15
+ }
16
+
17
+ private TestAsset SetupTestAsset ( [ CallerMemberName ] string callingMethod = "" )
18
+ {
19
+ TestAsset helloWorldAsset = _testAssetsManager
20
+ . CopyTestAsset ( "PortableTool" , callingMethod )
21
+ . WithSource ( ) ;
22
+
23
+
24
+ return helloWorldAsset ;
25
+ }
26
+
27
+ [ Fact ]
28
+ // this test verifies that we don't regress the 'normal' publish experience accidentally in the
29
+ // PackTool.targets
30
+ public void It_can_publish_and_has_apphost ( )
31
+ {
32
+ var testAsset = SetupTestAsset ( ) ;
33
+ var publishCommand = new PublishCommand ( testAsset ) ;
34
+
35
+ publishCommand . Execute ( ) ;
36
+
37
+ publishCommand . GetOutputDirectory ( targetFramework : ToolsetInfo . CurrentTargetFramework )
38
+ . EnumerateFiles ( ) . Should ( ) . Contain ( f => f . Name == "consoledemo" + Constants . ExeSuffix ) ;
39
+ }
40
+ }
41
+ }
You can’t perform that action at this time.
0 commit comments