public void GetDescription_GivenAEnumWithDescriptionAttr_ShouldGetCorrectDescription() { const EnumSample @enum = EnumSample.LaLaLa; @enum.GetDescription().Should().Be("LaLaLa Description"); }
public void TestParse(string memeber, EnumSample sample) { Assert.Equal(sample, Util.Helpers.Enum.Parse <EnumSample>(memeber)); }
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 })); }