All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fireflysource.net.http.common.v1.encoder.HttpGeneratorExtension.kt Maven / Gradle / Ivy

There is a newer version: 5.0.2
Show newest version
package com.fireflysource.net.http.common.v1.encoder

import com.fireflysource.net.http.common.exception.Http1GeneratingResultException

fun HttpGenerator.Result.assert(expectResult: HttpGenerator.Result) {
    if (this != expectResult) {
        throw Http1GeneratingResultException("The HTTP generator result is $this, but expect $expectResult")
    }
}

fun HttpGenerator.Result.assert(expectResults: Set) {
    if (!expectResults.contains(this)) {
        throw Http1GeneratingResultException("The HTTP generator result is $this, but expect $expectResults")
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy