ios – Swift static properties should not marked as coated by exams in SonarQube

0
16
ios – Swift static properties should not marked as coated by exams in SonarQube


I’ve a number of exams written for a sequence of static properties inside an extension in Swift, however I can not get SonarQube to mark them as coated.

enter image description here

I’ve tried all the things, however even with the next code, it nonetheless says they don’t seem to be coated. Any concepts?

import XCTest
import SwiftUI
@testable import Core

class FontTests: XCTestCase {
    
    func testFontProperties() {
        
        XCTAssertNotNil(Font.flamaBook)
        XCTAssertNotNil(Font.flamaBasic)
        XCTAssertNotNil(Font.flamaMedium)
        
    }
    
    func testCustomFontDefinitions() {
        
        XCTAssertEqual(Font.flamaBook, "Flama-Ebook")
        XCTAssertEqual(Font.flamaBasic, "Flama-Fundamental")
        XCTAssertEqual(Font.flamaMedium, "Flama-Medium")
        
    }
    
    func testFontStyles() {
        
        XCTAssertEqual(Font.h1, Font.customized(Font.flamaBook, measurement: 24))
        XCTAssertEqual(Font.h2, Font.customized(Font.flamaBook, measurement: 18))
        XCTAssertEqual(Font.h3, Font.customized(Font.flamaBook, measurement: 16))
        XCTAssertEqual(Font.h4, Font.customized(Font.flamaMedium, measurement: 14))
        XCTAssertEqual(Font.p1, Font.customized(Font.flamaBook, measurement: 15))
        XCTAssertEqual(Font.p2, Font.customized(Font.flamaMedium, measurement: 12))
        XCTAssertEqual(Font.p3, Font.customized(Font.flamaBasic, measurement: 12))
        XCTAssertEqual(Font.hyperlink, Font.customized(Font.flamaBook, measurement: 16))
        XCTAssertEqual(Font.formElement, Font.customized(Font.flamaBook, measurement: 15))
        XCTAssertEqual(Font.formElementBasic, Font.customized(Font.flamaBasic, measurement: 15))
        XCTAssertEqual(Font.button, Font.customized(Font.flamaBook, measurement: 16))
        XCTAssertEqual(Font.otp, Font.customized(Font.flamaBasic, measurement: 30))
        XCTAssertEqual(Font.balance1, Font.customized(Font.flamaBasic, measurement: 22))
        XCTAssertEqual(Font.balance2, Font.customized(Font.flamaBasic, measurement: 36))
        XCTAssertEqual(Font.tabBar, Font.customized(Font.flamaMedium, measurement: 11))
        
    }
    
}

LEAVE A REPLY

Please enter your comment!
Please enter your name here