Open
Description
When writing test classes and using the line [assembly: Xunit.TestFramework("Elastic.Xunit.Sdk.ElasticTestFramework", "Elastic.Xunit")]
, none of the tests (even the non Elastic tests) are discovered. I'm sure it's something simple I'm missing, but I can't find anything. I've used Visual Studio 2019 and the command line to no avail.
It's almost an exact copy of the ExampleMinimal.
using API.Entities;
using Elastic.Xunit.XunitPlumbing;
using Elasticsearch.Net;
using Nest;
using System;
using System.Collections.Generic;
using System.Text;
using FluentAssertions;
using Elastic.Xunit;
using Elastic.Xunit.Sdk;
namespace TrackItTest
{
public class MyTestCluster : XunitClusterBase
{
public MyTestCluster() : base(new XunitClusterConfiguration("6.2.0") { })
{
}
}
public class ExampleTest : IClusterFixture<MyTestCluster>
{
private ElasticClient _client;
public ExampleTest(MyTestCluster cluster)
{
_client = cluster.GetOrAddClient(c =>
{
var nodes = cluster.NodesUris();
var connectionPool = new StaticConnectionPool(nodes);
var settings = new ConnectionSettings(connectionPool)
.EnableDebugMode();
return new ElasticClient(settings);
});
}
[I]
public void GetTrackableTest()
{
var rootNodeInfo = _client.RootNodeInfo();
rootNodeInfo.Name.Should().NotBeNullOrEmpty();
}
}
}
`
Metadata
Metadata
Assignees
Labels
No labels