Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
AnimationTests - need timeouts if something is bad news
  • Loading branch information
Jonathan Peppers committed Jan 18, 2017
1 parent bbdbf8c commit 8460709
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Xamarin.Forms.Mocks.Tests/AnimationTests.cs
Expand Up @@ -7,21 +7,23 @@ namespace Xamarin.Forms.Mocks.Tests
[TestFixture]
public class AnimationTests
{
private const int Timeout = 1000;

[SetUp]
public void SetUp()
{
MockForms.Init();
}

[Test]
[Test, Timeout(Timeout)]
public async Task FadeTo()
{
var view = new BoxView();
await view.FadeTo(0);
Assert.AreEqual(0, view.Opacity);
}

[Test]
[Test, Timeout(Timeout)]
public async Task ParallelFadeTo()
{
var a = new BoxView();
Expand All @@ -37,7 +39,7 @@ public async Task ParallelFadeTo()
Assert.AreEqual(0, b.Opacity);
}

[Test]
[Test, Timeout(Timeout)]
public async Task AnimationWithFinished()
{
var source = new TaskCompletionSource<bool>();
Expand All @@ -54,7 +56,7 @@ public async Task AnimationWithFinished()
Assert.AreEqual(0, view.Opacity);
}

[Test]
[Test, Timeout(Timeout)]
public async Task AnimationWithRepeatFinished()
{
var source = new TaskCompletionSource<bool>();
Expand Down

0 comments on commit 8460709

Please sign in to comment.