Skip to content

Commit 64414d9

Browse files
committed
test usage property with custom attribute
define custom attribute class specify attribute for fake Options_With_Usage_Attribute.Examples property
1 parent f23916f commit 64414d9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
using System;
2+
3+
[AttributeUsage(AttributeTargets.All)]
4+
class CustomAttribute: Attribute {}

tests/CommandLine.Tests/Fakes/Help_Fakes.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ class Options_With_Usage_Attribute
7979
[Option("secert-option", Hidden = true, HelpText = "This is a description for a secert hidden option that should never be visibile to the user via help text.")]
8080
public string SecertOption { get; set; }
8181

82-
[Usage(ApplicationAlias = "mono testapp.exe")]
82+
[ Custom
83+
, Usage(ApplicationAlias = "mono testapp.exe")
84+
]
8385
public static IEnumerable<Example> Examples
8486
{
8587
get

0 commit comments

Comments
 (0)