Add Button text ctor
This commit is contained in:
parent
d4eee234b2
commit
4c8c4e2b03
|
@ -11,6 +11,14 @@
|
|||
],
|
||||
"isBuildCommand": true,
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"taskName": "test",
|
||||
"args": [
|
||||
"${workspaceRoot}/Tests/Tests.csproj"
|
||||
],
|
||||
"isTestCommand": true,
|
||||
"problemMatcher": "$msCompile"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -15,5 +15,14 @@ namespace Ooui
|
|||
get => val;
|
||||
set => SetProperty (ref val, value, "value");
|
||||
}
|
||||
|
||||
public Button ()
|
||||
{
|
||||
}
|
||||
|
||||
public Button (string text)
|
||||
{
|
||||
Text = text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,5 +14,12 @@ namespace Tests
|
|||
var b = new Button ();
|
||||
Assert.AreEqual ("", b.Text);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void TextCtor ()
|
||||
{
|
||||
var b = new Button ("Hello World!");
|
||||
Assert.AreEqual ("Hello World!", b.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue