Coverage Summary for Class: NewsType (com.galarzaa.tibiakt.core.section.news.shared.model)
| Class |
Method, %
|
Branch, %
|
Line, %
|
Instruction, %
|
| NewsType |
100%
(3/3)
|
|
100%
(5/5)
|
100%
(52/52)
|
| NewsType$Companion |
100%
(1/1)
|
75%
(3/4)
|
100%
(1/1)
|
95.8%
(23/24)
|
| Total |
100%
(4/4)
|
75%
(3/4)
|
100%
(6/6)
|
98.7%
(75/76)
|
/*
* Copyright © 2025 Allan Galarza
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.galarzaa.tibiakt.core.section.news.shared.model
import com.galarzaa.tibiakt.core.enums.StringEnum
/** The available types of news. */
public enum class NewsType(override val value: String, public val displayName: String) : StringEnum {
NEWS("news", "News"),
NEWS_TICKER("ticker", "News Ticker"),
FEATURED_ARTICLE("article", "Featured Article");
/**
* The name of query parameter used to set this filter.
*/
public val filterName: String
get() = "filter_$value"
public companion object {
public fun fromDisplayName(displayName: String?): NewsType? = entries.find { it.displayName == displayName }
}
}