Edit on GitHub

xUnit1027 Error

Collection definition classes must be public


A collection definition class is not public.

Reason for rule

xUnit.net will not discover the collection definition class if the class is not public.

How to fix violations

To fix a violation of this rule, make the collection definition class public.



using Xunit;

class CollectionDefinitionClass
{ }

Does not violate

using Xunit;

public class CollectionDefinitionClass
{ }
Copyright © .NET Foundation. Contributions welcomed at https://github.com/xunit/xunit/tree/gh-pages.