Skip to main content
deleted 24 characters in body
Source Link

For simple unit tests using xunit I only have those references in my package :

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="xunit" version="2.4.1" targetFramework="net462" />
  <package id="xunit.abstractions" version="2.0.3" targetFramework="net462" />
  <package id="xunit.analyzers" version="0.10.0" targetFramework="net462" />
  <package id="xunit.assert" version="2.4.1" targetFramework="net462" />
  <package id="xunit.core" version="2.4.1" targetFramework="net462" />
  <package id="xunit.extensibility.core" version="2.4.1" targetFramework="net462" />
  <package id="xunit.extensibility.execution" version="2.4.1" targetFramework="net462" />
  <package id="xunit.runner.console" version="2.4.1" targetFramework="net462" developmentDependency="true" />
  <package id="xunit.runner.visualstudio" version="2.4.1" targetFramework="net462" developmentDependency="true" />
</packages>

So I believe the XUnit.Runner.VisualStudio(2.4.3) should be 2.4.1.

Then a simple test could look like that

using aProject.Foundation.Utilities.Extensions;
using Xunit;

namespace aProject.Foundation.Utilities.Tests
{
    public class ExtensionsTests
    {
        public class StringExtensionTests
        {
            [Theory]
            [InlineData("some awesome string")]
            [InlineData("  some  awesome  string  ")]
            public void Should_returnValidSlug_When_passingStringWithSpaces(string name)
            {
                Assert.Equal("some-awesome-string", name.ToSlug());
            }
        }
    }
}

For simple unit tests using xunit I only have those references in my package :

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="xunit" version="2.4.1" targetFramework="net462" />
  <package id="xunit.abstractions" version="2.0.3" targetFramework="net462" />
  <package id="xunit.analyzers" version="0.10.0" targetFramework="net462" />
  <package id="xunit.assert" version="2.4.1" targetFramework="net462" />
  <package id="xunit.core" version="2.4.1" targetFramework="net462" />
  <package id="xunit.extensibility.core" version="2.4.1" targetFramework="net462" />
  <package id="xunit.extensibility.execution" version="2.4.1" targetFramework="net462" />
  <package id="xunit.runner.console" version="2.4.1" targetFramework="net462" developmentDependency="true" />
  <package id="xunit.runner.visualstudio" version="2.4.1" targetFramework="net462" developmentDependency="true" />
</packages>

So I believe the XUnit.Runner.VisualStudio(2.4.3) should be 2.4.1.

For simple unit tests using xunit I only have those references in my package :

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="xunit" version="2.4.1" targetFramework="net462" />
  <package id="xunit.abstractions" version="2.0.3" targetFramework="net462" />
  <package id="xunit.analyzers" version="0.10.0" targetFramework="net462" />
  <package id="xunit.assert" version="2.4.1" targetFramework="net462" />
  <package id="xunit.core" version="2.4.1" targetFramework="net462" />
  <package id="xunit.extensibility.core" version="2.4.1" targetFramework="net462" />
  <package id="xunit.extensibility.execution" version="2.4.1" targetFramework="net462" />
  <package id="xunit.runner.console" version="2.4.1" targetFramework="net462" developmentDependency="true" />
  <package id="xunit.runner.visualstudio" version="2.4.1" targetFramework="net462" developmentDependency="true" />
</packages>

So I believe the XUnit.Runner.VisualStudio(2.4.3) should be 2.4.1.

Then a simple test could look like that

using aProject.Foundation.Utilities.Extensions;
using Xunit;

namespace aProject.Foundation.Utilities.Tests
{
    public class ExtensionsTests
    {
        public class StringExtensionTests
        {
            [Theory]
            [InlineData("some awesome string")]
            [InlineData("  some  awesome  string  ")]
            public void Should_returnValidSlug_When_passingStringWithSpaces(string name)
            {
                Assert.Equal("some-awesome-string", name.ToSlug());
            }
        }
    }
}
deleted 24 characters in body
Source Link

For simple unit tests using xunit I only have those references in my package :

<<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="xunit" version="2.4.1" targetFramework="net462" />
  <package id="xunit.abstractions" version="2.0.3" targetFramework="net462" />
  <package id="xunit.analyzers" version="0.10.0" targetFramework="net462" />
  <package id="xunit.assert" version="2.4.1" targetFramework="net462" />
  <package id="xunit.core" version="2.4.1" targetFramework="net462" />
  <package id="xunit.extensibility.core" version="2.4.1" targetFramework="net462" />
  <package id="xunit.extensibility.execution" version="2.4.1" targetFramework="net462" />
  <package id="xunit.runner.console" version="2.4.1" targetFramework="net462" developmentDependency="true" />
  <package id="xunit.runner.visualstudio" version="2.4.1" targetFramework="net462" developmentDependency="true" />
</packages>

So I believe it might be about the XUnit.Runner.VisualStudio(2.4.3) that should be 2.4.1.

For simple unit tests using xunit I only have those references in my package :

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="xunit" version="2.4.1" targetFramework="net462" />
  <package id="xunit.abstractions" version="2.0.3" targetFramework="net462" />
  <package id="xunit.analyzers" version="0.10.0" targetFramework="net462" />
  <package id="xunit.assert" version="2.4.1" targetFramework="net462" />
  <package id="xunit.core" version="2.4.1" targetFramework="net462" />
  <package id="xunit.extensibility.core" version="2.4.1" targetFramework="net462" />
  <package id="xunit.extensibility.execution" version="2.4.1" targetFramework="net462" />
  <package id="xunit.runner.console" version="2.4.1" targetFramework="net462" developmentDependency="true" />
  <package id="xunit.runner.visualstudio" version="2.4.1" targetFramework="net462" developmentDependency="true" />
</packages>

So I believe it might be about the XUnit.Runner.VisualStudio(2.4.3) that should be 2.4.1.

For simple unit tests using xunit I only have those references in my package :

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="xunit" version="2.4.1" targetFramework="net462" />
  <package id="xunit.abstractions" version="2.0.3" targetFramework="net462" />
  <package id="xunit.analyzers" version="0.10.0" targetFramework="net462" />
  <package id="xunit.assert" version="2.4.1" targetFramework="net462" />
  <package id="xunit.core" version="2.4.1" targetFramework="net462" />
  <package id="xunit.extensibility.core" version="2.4.1" targetFramework="net462" />
  <package id="xunit.extensibility.execution" version="2.4.1" targetFramework="net462" />
  <package id="xunit.runner.console" version="2.4.1" targetFramework="net462" developmentDependency="true" />
  <package id="xunit.runner.visualstudio" version="2.4.1" targetFramework="net462" developmentDependency="true" />
</packages>

So I believe the XUnit.Runner.VisualStudio(2.4.3) should be 2.4.1.

Source Link

For simple unit tests using xunit I only have those references in my package :

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="xunit" version="2.4.1" targetFramework="net462" />
  <package id="xunit.abstractions" version="2.0.3" targetFramework="net462" />
  <package id="xunit.analyzers" version="0.10.0" targetFramework="net462" />
  <package id="xunit.assert" version="2.4.1" targetFramework="net462" />
  <package id="xunit.core" version="2.4.1" targetFramework="net462" />
  <package id="xunit.extensibility.core" version="2.4.1" targetFramework="net462" />
  <package id="xunit.extensibility.execution" version="2.4.1" targetFramework="net462" />
  <package id="xunit.runner.console" version="2.4.1" targetFramework="net462" developmentDependency="true" />
  <package id="xunit.runner.visualstudio" version="2.4.1" targetFramework="net462" developmentDependency="true" />
</packages>

So I believe it might be about the XUnit.Runner.VisualStudio(2.4.3) that should be 2.4.1.