A game framework written with osu! in mind.
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
2// See the LICENCE file in the repository root for full licence text.
3
4using NUnit.Framework;
5using osu.Framework.Extensions;
6
7namespace osu.Framework.Tests.Extensions
8{
9 [TestFixture]
10 public class TestExtensions
11 {
12 [TestCase(TestEnum.Value1, "Value1")]
13 [TestCase(TestEnum.Value2, "V2")]
14 [TestCase((TestEnum)3, "3")]
15 public void TestGetDescription(TestEnum enumValue, string expected)
16 {
17 Assert.That(enumValue.GetDescription(), Is.EqualTo(expected));
18 }
19
20 public enum TestEnum
21 {
22 Value1,
23
24 [System.ComponentModel.Description("V2")]
25 Value2,
26 }
27 }
28}