public void GetDescription_GivenAEnumWithDescriptionAttr_ShouldGetCorrectDescription()
        {
            const EnumSample @enum = EnumSample.LaLaLa;

            @enum.GetDescription().Should().Be("LaLaLa Description");
        }
Beispiel #2
0
 public void TestParse(string memeber, EnumSample sample)
 {
     Assert.Equal(sample, Util.Helpers.Enum.Parse <EnumSample>(memeber));
 }
Beispiel #3
0
 public virtual Result GetDefaultValue([FromQuery] string q, [FromQuery] int page = 1, [FromQuery] int pageSize = 20, [FromQuery] EnumSample enumSample = EnumSample.Two)
 {
     return(Result.Success(new
     {
         q,
         page,
         pageSize
     }));
 }