[Test] | |
[Timeout(2000)] | |
public async Task WriteToFile_StreamsChanged() | |
{ | |
using (var watcher = new ObservableFileSystemWatcher(c => { c.Path = TempPath; })) | |
{ | |
var firstChanged = watcher.Changed.FirstAsync().ToTask(); | |
watcher.Start(); | |
File.WriteAllText(Path.Combine(TempPath, "Changed.Txt"), "foo"); | |
var changed = await firstChanged; | |
Expect(changed.ChangeType, Is.EqualTo(WatcherChangeTypes.Changed)); | |
Expect(changed.Name, Is.EqualTo("Changed.Txt")); | |
} | |
} |
This comment has been minimized.
This comment has been minimized.
Wes, what's the assert library used here? i mean the piece: Exepect(..., Is.EqualTo(...)) Thx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
This is a gist of this my post c# async/await makes reactive testing expressive!