Skip to content

Commit

Permalink
Refactor indexmanager tests to use theory
Browse files Browse the repository at this point in the history
  • Loading branch information
nr-ahemsath committed Jun 20, 2023
1 parent eed075b commit ac27fd4
Showing 1 changed file with 14 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,75 +62,23 @@ public void CheckForDatastoreInstanceMetrics()
Assert.NotNull(m);
}

[Fact]
public void CreateOne()
{
var m = _fixture.AgentLog.GetMetricByName($"{DatastorePath}/CreateOne");
Assert.NotNull(m);
}

[Fact]
public void CreateOneAsync()
{
var m = _fixture.AgentLog.GetMetricByName($"{DatastorePath}/CreateOneAsync");
Assert.NotNull(m);
}

[Fact]
public void CreateMany()
{
var m = _fixture.AgentLog.GetMetricByName($"{DatastorePath}/CreateMany");
Assert.NotNull(m);
}

[Fact]
public void CreateManyAsync()
{
var m = _fixture.AgentLog.GetMetricByName($"{DatastorePath}/CreateManyAsync");
Assert.NotNull(m);
}

[Fact]
public void DropAll()
{
var m = _fixture.AgentLog.GetMetricByName($"{DatastorePath}/DropAll");
Assert.NotNull(m);
}

[Fact]
public void DropAllAsync()
{
var m = _fixture.AgentLog.GetMetricByName($"{DatastorePath}/DropAllAsync");
Assert.NotNull(m);
}

[Fact]
public void DropOne()
{
var m = _fixture.AgentLog.GetMetricByName($"{DatastorePath}/DropOne");
[Theory]
[InlineData("CreateOne")]
[InlineData("CreateOneAsync")]
[InlineData("CreateMany")]
[InlineData("CreateManyAsync")]
[InlineData("DropAll")]
[InlineData("DropAllAsync")]
[InlineData("DropOne")]
[InlineData("DropOneAsync")]
[InlineData("List")]
[InlineData("ListAsync")]
public void CheckForOperationMetrics(string operationName)
{
var m = _fixture.AgentLog.GetMetricByName($"{DatastorePath}/{operationName}");
Assert.NotNull(m);
}

[Fact]
public void DropOneAsync()
{
var m = _fixture.AgentLog.GetMetricByName($"{DatastorePath}/DropOneAsync");
Assert.NotNull(m);
}

[Fact]
public void List()
{
var m = _fixture.AgentLog.GetMetricByName($"{DatastorePath}/List");
Assert.NotNull(m);
}

[Fact]
public void ListAsync()
{
var m = _fixture.AgentLog.GetMetricByName($"{DatastorePath}/ListAsync");
Assert.NotNull(m);
}
}

[NetFrameworkTest]
Expand Down

0 comments on commit ac27fd4

Please sign in to comment.