Skip to content

hack-example Branch is working => so far #8

@GeorgeS2019

Description

@GeorgeS2019

https://github.com/fledware/GodotXUnit/tree/hack-example
Godot Version: 3.3.rc7.mono
Windows 10:

Step 1

GodotProjectName.csproj

<Project Sdk="Godot.NET.Sdk/3.3.0">
  <PropertyGroup>
    <TargetFramework>net472</TargetFramework>
    <LangVersion>8.0</LangVersion>
    <RootNamespace>GodotProjectName</RootNamespace>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
    <PackageReference Include="xunit" Version="2.4.1" />
    <PackageReference Include="xunit.runner.utility" Version="2.4.1" />
  </ItemGroup>
</Project>

Step 2

GodotProjectName.dll

  • GodotFactAttribute.cs
    [XunitTestCaseDiscoverer("GodotXUnitApi.Internal.GodotFactDiscoverer", "GodotProjectName")]
    // ReSharper disable once ClassWithVirtualMembersNeverInherited.Global
    public class GodotFactAttribute : FactAttribute
    {
    }

Known issues

  • Visual Studio 2019 debug tests no longer work => suggestion??

Benefits

  • One single csproj project managed by Godot mono build tool.
  • Simplicity of .NET5 SDK project format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions