using clauses cleanup
This commit is contained in:
parent
1868ed86e5
commit
7f03dd7272
292 changed files with 91 additions and 685 deletions
|
|
@ -1,9 +1,3 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
|
||||
namespace PostIt.Tests;
|
||||
|
||||
public class SettingsLoadTests
|
||||
|
|
@ -109,7 +103,7 @@ public class SettingsLoadTests
|
|||
{
|
||||
failures.Add(ex);
|
||||
}
|
||||
});
|
||||
}, TestContext.Current.CancellationToken);
|
||||
}
|
||||
await Task.WhenAll(tasks);
|
||||
|
||||
|
|
@ -129,7 +123,7 @@ public class SettingsLoadTests
|
|||
/// and checking that Loaded flips exactly once (no torn reads).
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void Load_is_idempotent_under_concurrent_calls()
|
||||
public async Task Load_is_idempotent_under_concurrent_calls()
|
||||
{
|
||||
var settings = new PostIt.ViewModels.Settings
|
||||
{
|
||||
|
|
@ -149,9 +143,9 @@ public class SettingsLoadTests
|
|||
{
|
||||
barrier.SignalAndWait();
|
||||
settings.Load();
|
||||
});
|
||||
}, TestContext.Current.CancellationToken);
|
||||
}
|
||||
Task.WaitAll(tasks);
|
||||
await Task.WhenAll(tasks);
|
||||
|
||||
Assert.True(settings.Loaded);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue