mirror of https://github.com/LordMike/TMDbLib.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.
37 lines
863 B
37 lines
863 B
using System;
|
|
using TMDbLib.Utilities;
|
|
using TMDbLibTests.JsonHelpers;
|
|
using TMDbLibTests.TestClasses;
|
|
using Xunit;
|
|
|
|
namespace TMDbLibTests.UtilityTests
|
|
{
|
|
public class UtilsTest : TestBase
|
|
{
|
|
[Fact]
|
|
public void EnumDescriptionNonEnumTest()
|
|
{
|
|
EnumTestStruct strct = new EnumTestStruct();
|
|
|
|
Assert.Throws<ArgumentException>(() => strct.GetDescription());
|
|
}
|
|
|
|
[Fact]
|
|
public void EnumDescriptionNonDescriptionTest()
|
|
{
|
|
EnumTestEnum enm = EnumTestEnum.A;
|
|
string s = enm.GetDescription();
|
|
|
|
Assert.Equal("A", s);
|
|
}
|
|
|
|
[Fact]
|
|
public void EnumDescriptionTest()
|
|
{
|
|
EnumTestEnum enm = EnumTestEnum.B;
|
|
string s = enm.GetDescription();
|
|
|
|
Assert.Equal("B-Description", s);
|
|
}
|
|
}
|
|
}
|