Skip to content

Commit

Permalink
Remove public access to user instance. It's API is not really suitabl…
Browse files Browse the repository at this point in the history
…e for public use - the corresponding methods of the QuickTest class make additional relevant consistency checks.
  • Loading branch information
stephanpalmer committed Nov 19, 2020
1 parent 06509d2 commit f87743a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions QuickTest/QuickTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ namespace QuickTest
public class QuickTest<T> where T : Application
{
User user;
public User User {
User User {
get {
if (user == null)
throw new LaunchException();
return user;
}
private set {
set {
user = value;
}
}
Expand All @@ -35,7 +35,7 @@ protected virtual void SetUp()
[TearDown]
protected virtual void TearDown()
{
User?.Print();
Print();
}

public void Launch(T app)
Expand Down Expand Up @@ -221,6 +221,11 @@ protected virtual string Render()
return User.Render();
}

protected virtual void Print()
{
Console.WriteLine(Render());
}

protected QuickTest<T> After(double seconds)
{
return CreateWithTimeout(App, User, TimeSpan.FromSeconds(seconds));
Expand Down

0 comments on commit f87743a

Please sign in to comment.