public void should_create_enum_dto() { var dto = EnumDto.Create(LineStatusCode.ConnectedCalled); Assert.AreEqual(5, dto.Value); Assert.AreEqual("ConnectedCalled", dto.Name); Assert.AreEqual("Samtal uppringt", dto.Description); }
public IActionResult Status([FromQuery] Language?language = null) { _translator.SetContext(language); return(Ok(new List <EnumDto>() { EnumDto.Create((int)ScheduledMessageStatus.Pending, _translator.T().Enum(ScheduledMessageStatus.Pending)), EnumDto.Create((int)ScheduledMessageStatus.Sent, _translator.T().Enum(ScheduledMessageStatus.Sent)), EnumDto.Create((int)ScheduledMessageStatus.Failed, _translator.T().Enum(ScheduledMessageStatus.Failed)) })); }
public IActionResult ViewPunishmentActiveStatus([FromQuery] Language?language = null) { _translator.SetContext(language); return(Ok(new List <EnumDto>() { EnumDto.Create((int)PunishmentActiveStatus.None, _translator.T().Enum(PunishmentActiveStatus.None)), EnumDto.Create((int)PunishmentActiveStatus.Inactive, _translator.T().Enum(PunishmentActiveStatus.Inactive)), EnumDto.Create((int)PunishmentActiveStatus.Active, _translator.T().Enum(PunishmentActiveStatus.Active)) })); }
public IActionResult ViewPermissions([FromQuery] Language?language = null) { _translator.SetContext(language); return(Ok(new List <EnumDto>() { EnumDto.Create((int)ViewPermission.Global, _translator.T().Enum(ViewPermission.Global)), EnumDto.Create((int)ViewPermission.Guild, _translator.T().Enum(ViewPermission.Guild)), EnumDto.Create((int)ViewPermission.Self, _translator.T().Enum(ViewPermission.Self)) })); }
public IActionResult ViewEditStatus([FromQuery] Language?language = null) { _translator.SetContext(language); return(Ok(new List <EnumDto>() { EnumDto.Create((int)EditStatus.None, _translator.T().Enum(EditStatus.None)), EnumDto.Create((int)EditStatus.Unedited, _translator.T().Enum(EditStatus.Unedited)), EnumDto.Create((int)EditStatus.Edited, _translator.T().Enum(EditStatus.Edited)) })); }
public IActionResult FailureReason([FromQuery] Language?language = null) { _translator.SetContext(language); return(Ok(new List <EnumDto>() { EnumDto.Create((int)ScheduledMessageFailureReason.Unknown, _translator.T().Enum(ScheduledMessageFailureReason.Unknown)), EnumDto.Create((int)ScheduledMessageFailureReason.ChannelNotFound, _translator.T().Enum(ScheduledMessageFailureReason.ChannelNotFound)), EnumDto.Create((int)ScheduledMessageFailureReason.InsufficientPermission, _translator.T().Enum(ScheduledMessageFailureReason.InsufficientPermission)) })); }
public IActionResult ViewMarkedToDeleteStatus([FromQuery] Language?language = null) { _translator.SetContext(language); return(Ok(new List <EnumDto>() { EnumDto.Create((int)MarkedToDeleteStatus.None, _translator.T().Enum(MarkedToDeleteStatus.None)), EnumDto.Create((int)MarkedToDeleteStatus.Unmarked, _translator.T().Enum(MarkedToDeleteStatus.Unmarked)), EnumDto.Create((int)MarkedToDeleteStatus.Marked, _translator.T().Enum(MarkedToDeleteStatus.Marked)) })); }
public IActionResult ChannelNotificationBehavior([FromQuery] Language?language = null) { _translator.SetContext(language); return(Ok(new List <EnumDto>() { EnumDto.Create((int)AutoModerationChannelNotificationBehavior.SendNotification, _translator.T().Enum(AutoModerationChannelNotificationBehavior.SendNotification)), EnumDto.Create((int)AutoModerationChannelNotificationBehavior.SendNotificationAndDelete, _translator.T().Enum(AutoModerationChannelNotificationBehavior.SendNotificationAndDelete)), EnumDto.Create((int)AutoModerationChannelNotificationBehavior.NoNotification, _translator.T().Enum(AutoModerationChannelNotificationBehavior.NoNotification)) })); }
public IActionResult AutoModActions([FromQuery] Language?language = null) { _translator.SetContext(language); return(Ok(new List <EnumDto>() { EnumDto.Create((int)AutoModerationAction.None, _translator.T().Enum(AutoModerationAction.None)), EnumDto.Create((int)AutoModerationAction.ContentDeleted, _translator.T().Enum(AutoModerationAction.ContentDeleted)), EnumDto.Create((int)AutoModerationAction.CaseCreated, _translator.T().Enum(AutoModerationAction.CaseCreated)), EnumDto.Create((int)AutoModerationAction.ContentDeletedAndCaseCreated, _translator.T().Enum(AutoModerationAction.ContentDeletedAndCaseCreated)) })); }
public IActionResult CreationType([FromQuery] Language?language = null) { _translator.SetContext(language); return(Ok(new List <EnumDto>() { EnumDto.Create((int)CaseCreationType.Default, _translator.T().Enum(CaseCreationType.Default)), EnumDto.Create((int)CaseCreationType.AutoModeration, _translator.T().Enum(CaseCreationType.AutoModeration)), EnumDto.Create((int)CaseCreationType.Imported, _translator.T().Enum(CaseCreationType.Imported)), EnumDto.Create((int)CaseCreationType.ByCommand, _translator.T().Enum(CaseCreationType.ByCommand)) })); }
public IActionResult Punishment([FromQuery] Language?language = null) { _translator.SetContext(language); return(Ok(new List <EnumDto>() { EnumDto.Create((int)PunishmentType.Warn, _translator.T().Enum(PunishmentType.Warn)), EnumDto.Create((int)PunishmentType.Mute, _translator.T().Enum(PunishmentType.Mute)), EnumDto.Create((int)PunishmentType.Kick, _translator.T().Enum(PunishmentType.Kick)), EnumDto.Create((int)PunishmentType.Ban, _translator.T().Enum(PunishmentType.Ban)) })); }
public IActionResult LanguageEnum([FromQuery] Language?language = null) { _translator.SetContext(language); return(Ok(new List <EnumDto>() { EnumDto.Create((int)Language.en, _translator.T().Enum(Language.en)), EnumDto.Create((int)Language.de, _translator.T().Enum(Language.de)), EnumDto.Create((int)Language.fr, _translator.T().Enum(Language.fr)), EnumDto.Create((int)Language.es, _translator.T().Enum(Language.es)), EnumDto.Create((int)Language.it, _translator.T().Enum(Language.it)), EnumDto.Create((int)Language.at, _translator.T().Enum(Language.at)), EnumDto.Create((int)Language.ru, _translator.T().Enum(Language.ru)) })); }
public IActionResult AutoModTypes([FromQuery] Language?language = null) { _translator.SetContext(language); return(Ok(new List <EnumDto>() { EnumDto.Create((int)AutoModerationType.InvitePosted, _translator.T().Enum(AutoModerationType.InvitePosted)), EnumDto.Create((int)AutoModerationType.TooManyEmotes, _translator.T().Enum(AutoModerationType.TooManyEmotes)), EnumDto.Create((int)AutoModerationType.TooManyMentions, _translator.T().Enum(AutoModerationType.TooManyMentions)), EnumDto.Create((int)AutoModerationType.TooManyAttachments, _translator.T().Enum(AutoModerationType.TooManyAttachments)), EnumDto.Create((int)AutoModerationType.TooManyEmbeds, _translator.T().Enum(AutoModerationType.TooManyEmbeds)), EnumDto.Create((int)AutoModerationType.TooManyAutoModerations, _translator.T().Enum(AutoModerationType.TooManyAutoModerations)), EnumDto.Create((int)AutoModerationType.CustomWordFilter, _translator.T().Enum(AutoModerationType.CustomWordFilter)), EnumDto.Create((int)AutoModerationType.TooManyMessages, _translator.T().Enum(AutoModerationType.TooManyMessages)), EnumDto.Create((int)AutoModerationType.TooManyDuplicatedCharacters, _translator.T().Enum(AutoModerationType.TooManyDuplicatedCharacters)), EnumDto.Create((int)AutoModerationType.TooManyLinks, _translator.T().Enum(AutoModerationType.TooManyLinks)) })); }
public IActionResult CreationType([FromQuery] Language?language = null) { _translator.SetContext(language); return(Ok(new List <EnumDto>() { EnumDto.Create((int)APIError.Unknown, _translator.T().Enum(APIError.Unknown)), EnumDto.Create((int)APIError.InvalidDiscordUser, _translator.T().Enum(APIError.InvalidDiscordUser)), EnumDto.Create((int)APIError.ProtectedModCaseSuspect, _translator.T().Enum(APIError.ProtectedModCaseSuspect)), EnumDto.Create((int)APIError.ProtectedModCaseSuspectIsBot, _translator.T().Enum(APIError.ProtectedModCaseSuspectIsBot)), EnumDto.Create((int)APIError.ProtectedModCaseSuspectIsSiteAdmin, _translator.T().Enum(APIError.ProtectedModCaseSuspectIsSiteAdmin)), EnumDto.Create((int)APIError.ProtectedModCaseSuspectIsTeam, _translator.T().Enum(APIError.ProtectedModCaseSuspectIsTeam)), EnumDto.Create((int)APIError.ResourceNotFound, _translator.T().Enum(APIError.ResourceNotFound)), EnumDto.Create((int)APIError.InvalidIdentity, _translator.T().Enum(APIError.InvalidIdentity)), EnumDto.Create((int)APIError.GuildUnregistered, _translator.T().Enum(APIError.GuildUnregistered)), EnumDto.Create((int)APIError.Unauthorized, _translator.T().Enum(APIError.Unauthorized)), EnumDto.Create((int)APIError.GuildUndefinedMutedRoles, _translator.T().Enum(APIError.GuildUndefinedMutedRoles)), EnumDto.Create((int)APIError.ModCaseIsMarkedToBeDeleted, _translator.T().Enum(APIError.ModCaseIsMarkedToBeDeleted)), EnumDto.Create((int)APIError.ModCaseIsNotMarkedToBeDeleted, _translator.T().Enum(APIError.ModCaseIsNotMarkedToBeDeleted)), EnumDto.Create((int)APIError.GuildAlreadyRegistered, _translator.T().Enum(APIError.GuildAlreadyRegistered)), EnumDto.Create((int)APIError.NotAllowedInDemoMode, _translator.T().Enum(APIError.NotAllowedInDemoMode)), EnumDto.Create((int)APIError.RoleNotFound, _translator.T().Enum(APIError.RoleNotFound)), EnumDto.Create((int)APIError.TokenCannotManageThisResource, _translator.T().Enum(APIError.TokenCannotManageThisResource)), EnumDto.Create((int)APIError.TokenAlreadyRegistered, _translator.T().Enum(APIError.TokenAlreadyRegistered)), EnumDto.Create((int)APIError.CannotBeSameUser, _translator.T().Enum(APIError.CannotBeSameUser)), EnumDto.Create((int)APIError.ResourceAlreadyExists, _translator.T().Enum(APIError.ResourceAlreadyExists)), EnumDto.Create((int)APIError.ModCaseDoesNotAllowComments, _translator.T().Enum(APIError.ModCaseDoesNotAllowComments)), EnumDto.Create((int)APIError.LastCommentAlreadyFromSuspect, _translator.T().Enum(APIError.LastCommentAlreadyFromSuspect)), EnumDto.Create((int)APIError.InvalidAutomoderationAction, _translator.T().Enum(APIError.InvalidAutomoderationAction)), EnumDto.Create((int)APIError.InvalidAutomoderationType, _translator.T().Enum(APIError.InvalidAutomoderationType)), EnumDto.Create((int)APIError.TooManyTemplates, _translator.T().Enum(APIError.TooManyTemplates)), EnumDto.Create((int)APIError.InvalidFilePath, _translator.T().Enum(APIError.InvalidFilePath)), EnumDto.Create((int)APIError.NoGuildsRegistered, _translator.T().Enum(APIError.NoGuildsRegistered)), EnumDto.Create((int)APIError.OnlyUsableInAGuild, _translator.T().Enum(APIError.OnlyUsableInAGuild)), EnumDto.Create((int)APIError.InvalidAuditLogEvent, _translator.T().Enum(APIError.InvalidAuditLogEvent)), EnumDto.Create((int)APIError.ProtectedScheduledMessage, _translator.T().Enum(APIError.ProtectedScheduledMessage)), EnumDto.Create((int)APIError.InvalidDateForScheduledMessage, _translator.T().Enum(APIError.InvalidDateForScheduledMessage)) })); }