-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from BrunoZell/projection-reset
Add projection reset to client
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
test/EventStore.Client.ProjectionManagement.Tests/reset.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
|
||
namespace EventStore.Client { | ||
public class reset : IClassFixture<reset.Fixture> { | ||
private readonly Fixture _fixture; | ||
|
||
public reset(Fixture fixture) { | ||
_fixture = fixture; | ||
} | ||
|
||
[Fact] | ||
public async Task status_is_running() { | ||
var name = StandardProjections.Names.First(); | ||
await _fixture.Client.ResetAsync(name, TestCredentials.Root); | ||
var result = await _fixture.Client.GetStatusAsync(name, TestCredentials.Root); | ||
Assert.Equal("Running", result.Status); | ||
} | ||
|
||
public class Fixture : EventStoreClientFixture { | ||
protected override Task Given() => Task.CompletedTask; | ||
protected override Task When() => Task.CompletedTask; | ||
} | ||
} | ||
} |