mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
832 B
29 lines
832 B
// ==========================================================================
|
|
// EnumExtensionsTests.cs
|
|
// PinkParrot Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) PinkParrot Group
|
|
// All rights reserved.
|
|
// ==========================================================================
|
|
|
|
using System;
|
|
using Xunit;
|
|
|
|
namespace PinkParrot.Infrastructure
|
|
{
|
|
public sealed class EnumExtensionsTests
|
|
{
|
|
[Fact]
|
|
public void Should_return_true_if_enum_is_valid()
|
|
{
|
|
Assert.True(DateTimeKind.Local.IsEnumValue());
|
|
}
|
|
|
|
[Fact]
|
|
public void Should_return_false_if_enum_is_not_valid()
|
|
{
|
|
Assert.False(((DateTimeKind)13).IsEnumValue());
|
|
Assert.False(123.IsEnumValue());
|
|
}
|
|
}
|
|
}
|