Purpose is to validate Enum.
namespace Test.Enums
{
public enum Type
{
Audi,
Porsche,
Peugeot
}
}
I would like to write these values into an array so that I can compare them.
[Fact]
public void Test()
{
//arrange
string[] expected = {"Audi", "Porsche", "Peugeot"};
string[] actual = new Test.Enums.Type();
//assert
Assert.Equal(expected, actual);
}
How to correctly get enum values into an array to be able to compare them? I will be grateful for your help.