Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for quarterly graph routes #4809

Merged
merged 6 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ abstract class RatesGraph(
}
}

private def getSummary: CancelableFuture[GraphSeriesInfo] = category match {
def getSummary: CancelableFuture[GraphSeriesInfo] = category match {
case Category.BY_TYPE_NO_HELOC =>
for {
conventionalConforming <- getSummaryByType(Conventional, CONVENTIONAL_CONFORMING, conforming = true)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package hmda.quarterly.data.api.route

import org.scalatest.{Matchers, WordSpec}
import hmda.quarterly.data.api.route.rates.denials.DenialRatesByTypeLoanPurposeHome


class DenialRatesByTypeLoanPurposeHomeSpec extends WordSpec with Matchers {
val route = DenialRatesByTypeLoanPurposeHome.getRoute
val routeSummary = DenialRatesByTypeLoanPurposeHome.getSummary
"denial rates by type loan purpose home route" should {
"return the correct summary route" in {
assert(!routeSummary.isCompleted)
jaredb96 marked this conversation as resolved.
Show resolved Hide resolved
}
}
"denial rates by type loan purpose home route" should {
"have a string title" in {
jaredb96 marked this conversation as resolved.
Show resolved Hide resolved
assert(route.title.isInstanceOf[String])
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package hmda.quarterly.data.api.route

import org.scalatest.{Matchers, WordSpec}
import hmda.quarterly.data.api.route.rates.denials.DenialRatesByTypeLoanPurposeRefinance


class DenialRatesByTypeLoanPurposeRefinanceSpec extends WordSpec with Matchers {
val route = DenialRatesByTypeLoanPurposeRefinance.getRoute
val routeSummary = DenialRatesByTypeLoanPurposeRefinance.getSummary
"denial rates by type loan purpose refinance route" should {
"return the correct summary route" in {
assert(routeSummary.isCompleted)
}
}
"denial rates by type loan purpose refinance route" should {
"have a string title" in {
assert(route.title.isInstanceOf[String])
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package hmda.quarterly.data.api.route

import org.scalatest.{Matchers, WordSpec}
import hmda.quarterly.data.api.route.rates.denials.DenialRatesByType


class DenialRatesByTypeSpec extends WordSpec with Matchers {
val route = DenialRatesByType.getRoute
val routeSummary = DenialRatesByType.getSummary
"denial rates by type route" should {
"return the correct summary route" in {
assert(routeSummary.isCompleted)
}
}
"denial rates by type route" should {
"have a string title" in {
assert(route.title.isInstanceOf[String])
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package hmda.quarterly.data.api.route

import org.scalatest.{Matchers, WordSpec}
import hmda.quarterly.data.api.route.rates.denials.DenialRatesCCByRaceLoanPurposeHome


class DenialRatesCCByRaceLoanPurposeHomeSpec extends WordSpec with Matchers {
val route = DenialRatesCCByRaceLoanPurposeHome.getRoute
val routeSummary = DenialRatesCCByRaceLoanPurposeHome.getSummary
"denial rates cc by race loan purpose home route" should {
"return the correct summary route" in {
assert(routeSummary.isCompleted)
}
}
"denial rates cc by race loan purpose home route" should {
"have a string title" in {
assert(route.title.isInstanceOf[String])
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package hmda.quarterly.data.api.route

import org.scalatest.{Matchers, WordSpec}
import hmda.quarterly.data.api.route.rates.denials.DenialRatesCCByRaceLoanPurposeRefinance


class DenialRatesCCByRaceLoanPurposeRefinanceSpec extends WordSpec with Matchers {
val route = DenialRatesCCByRaceLoanPurposeRefinance.getRoute
val routeSummary = DenialRatesCCByRaceLoanPurposeRefinance.getSummary
"denial rates cc by race loan purpose refinance route" should {
"return the correct summary route" in {
assert(routeSummary.isCompleted)
}
}
"denial rates cc by race loan purpose refinance route" should {
"have a string title" in {
assert(route.title.isInstanceOf[String])
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package hmda.quarterly.data.api.route

import org.scalatest.{Matchers, WordSpec}
import hmda.quarterly.data.api.route.rates.denials.DenialRatesCCByRace


class DenialRatesCCByRaceSpec extends WordSpec with Matchers {
val route = DenialRatesCCByRace.getRoute
val routeSummary = DenialRatesCCByRace.getSummary
"denial rates cc by race route" should {
"return the correct summary route" in {
assert(!routeSummary.isCompleted)
}
}
"denial rates cc by race route" should {
"have a string title" in {
assert(route.title.isInstanceOf[String])
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package hmda.quarterly.data.api.route

import org.scalatest.{Matchers, WordSpec}
import hmda.quarterly.data.api.route.rates.denials.DenialRatesFHAByRaceLoanPurposeHome


class DenialRatesFHAByRaceLoanPurposeHomeSpec extends WordSpec with Matchers {
val route = DenialRatesFHAByRaceLoanPurposeHome.getRoute
val routeSummary = DenialRatesFHAByRaceLoanPurposeHome.getSummary
"denial rates fha by race loan purpose home route" should {
"return the correct summary route" in {
assert(routeSummary.isCompleted)
}
}
"denial rates fha by race loan purpose home route" should {
"have a string title" in {
assert(route.title.isInstanceOf[String])
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package hmda.quarterly.data.api.route

import org.scalatest.{Matchers, WordSpec}
import hmda.quarterly.data.api.route.rates.denials.DenialRatesFHAByRaceLoanPurposeRefinance


class DenialRatesFHAByRaceLoanPurposeRefinanceSpec extends WordSpec with Matchers {
val route = DenialRatesFHAByRaceLoanPurposeRefinance.getRoute
val routeSummary = DenialRatesFHAByRaceLoanPurposeRefinance.getSummary
"denial rates fha by race loan purpose refinance route" should {
"return the correct summary route" in {
assert(routeSummary.isCompleted)
}
}
"denial rates fha by race loan purpose refinance route" should {
"have a string title" in {
assert(route.title.isInstanceOf[String])
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package hmda.quarterly.data.api.route

import org.scalatest.{Matchers, WordSpec}
import hmda.quarterly.data.api.route.rates.denials.DenialRatesFHAByRace


class DenialRatesFHAByRaceSpec extends WordSpec with Matchers {
val route = DenialRatesFHAByRace.getRoute
val routeSummary = DenialRatesFHAByRace.getSummary
"denial rates fha by race route" should {
"return the correct summary route" in {
assert(routeSummary.isCompleted)
}
}
"denial rates fha by race route" should {
"have a string title" in {
assert(route.title.isInstanceOf[String])
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package hmda.quarterly.data.api.route

import org.scalatest.{Matchers, WordSpec}
import hmda.quarterly.data.api.route.rates.dti.MedianDTIByTypeLoanPurposeHome


class MedianDTIByTypeLoanPurposeHomeSpec extends WordSpec with Matchers {
val route = MedianDTIByTypeLoanPurposeHome.getRoute
val routeSummary = MedianDTIByTypeLoanPurposeHome.getSummary
"median dti by type loan purpose home route" should {
"return the correct summary route" in {
assert(!routeSummary.isCompleted)
}
}
"median dti by type loan purpose home route" should {
"have a string title" in {
assert(route.title.isInstanceOf[String])
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package hmda.quarterly.data.api.route

import org.scalatest.{Matchers, WordSpec}
import hmda.quarterly.data.api.route.rates.dti.MedianDTIByTypeLoanPurposeRefinance


class MedianDTIByTypeLoanPurposeRefinanceSpec extends WordSpec with Matchers {
val route = MedianDTIByTypeLoanPurposeRefinance.getRoute
val routeSummary = MedianDTIByTypeLoanPurposeRefinance.getSummary
"median dti by type loan purpose refinance route" should {
"return the correct summary route" in {
assert(routeSummary.isCompleted)
}
}
"median dti by type loan purpose refinance route" should {
"have a string title" in {
assert(route.title.isInstanceOf[String])
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package hmda.quarterly.data.api.route

import org.scalatest.{Matchers, WordSpec}
import hmda.quarterly.data.api.route.rates.dti.MedianDTIByType


class MedianDTIByTypeSpec extends WordSpec with Matchers {
val route = MedianDTIByType.getRoute
val routeSummary = MedianDTIByType.getSummary
"median dti by type route" should {
"return the correct summary route" in {
assert(routeSummary.isCompleted)
}
}
"median dti by type route" should {
"have a string title" in {
assert(route.title.isInstanceOf[String])
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package hmda.quarterly.data.api.route

import org.scalatest.{Matchers, WordSpec}
import hmda.quarterly.data.api.route.rates.dti.MedianDTICCByRaceLoanPurposeHome


class MedianDTICCByRaceLoanPurposeHomeSpec extends WordSpec with Matchers {
val route = MedianDTICCByRaceLoanPurposeHome.getRoute
val routeSummary = MedianDTICCByRaceLoanPurposeHome.getSummary
"median dticc by race loan purpose home route" should {
jaredb96 marked this conversation as resolved.
Show resolved Hide resolved
"return the correct summary route" in {
assert(routeSummary.isCompleted)
}
}
"median dticc by race loan purpose home route" should {
"have a string title" in {
assert(route.title.isInstanceOf[String])
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package hmda.quarterly.data.api.route

import org.scalatest.{Matchers, WordSpec}
import hmda.quarterly.data.api.route.rates.dti.MedianDTICCByRaceLoanPurposeRefinance


class MedianDTICCByRaceLoanPurposeRefinanceSpec extends WordSpec with Matchers {
val route = MedianDTICCByRaceLoanPurposeRefinance.getRoute
val routeSummary = MedianDTICCByRaceLoanPurposeRefinance.getSummary
"median dticc by race loan purpose refinance route" should {
jaredb96 marked this conversation as resolved.
Show resolved Hide resolved
"return the correct summary route" in {
assert(routeSummary.isCompleted)
}
}
"median dticc by race loan purpose refinance route" should {
"have a string title" in {
assert(route.title.isInstanceOf[String])
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package hmda.quarterly.data.api.route

import org.scalatest.{Matchers, WordSpec}
import hmda.quarterly.data.api.route.rates.dti.MedianDTICCByRace


class MedianDTICCByRaceSpec extends WordSpec with Matchers {
val route = MedianDTICCByRace.getRoute
val routeSummary = MedianDTICCByRace.getSummary
"median dticc by race route" should {
jaredb96 marked this conversation as resolved.
Show resolved Hide resolved
"return the correct summary route" in {
assert(routeSummary.isCompleted)
}
}
"median dticc by race route" should {
"have a string title" in {
assert(route.title.isInstanceOf[String])
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package hmda.quarterly.data.api.route

import org.scalatest.{Matchers, WordSpec}
import hmda.quarterly.data.api.route.rates.dti.MedianDTIFHAByRaceLoanPurposeHome


class MedianDTIFHAByRaceLoanPurposeHomeSpec extends WordSpec with Matchers {
val route = MedianDTIFHAByRaceLoanPurposeHome.getRoute
val routeSummary = MedianDTIFHAByRaceLoanPurposeHome.getSummary
"median dtifha by race loan purpose home route" should {
jaredb96 marked this conversation as resolved.
Show resolved Hide resolved
"return the correct summary route" in {
assert(routeSummary.isCompleted)
}
}
"median dtifha by race loan purpose home route" should {
"have a string title" in {
assert(route.title.isInstanceOf[String])
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package hmda.quarterly.data.api.route

import org.scalatest.{Matchers, WordSpec}
import hmda.quarterly.data.api.route.rates.dti.MedianDTIFHAByRaceLoanPurposeRefinance


class MedianDTIFHAByRaceLoanPurposeRefinanceSpec extends WordSpec with Matchers {
val route = MedianDTIFHAByRaceLoanPurposeRefinance.getRoute
val routeSummary = MedianDTIFHAByRaceLoanPurposeRefinance.getSummary
"median dtifha by race loan purpose refinance route" should {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

"return the correct summary route" in {
assert(!routeSummary.isCompleted)
}
}
"median dtifha by race loan purpose refinance route" should {
"have a string title" in {
assert(route.title.isInstanceOf[String])
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package hmda.quarterly.data.api.route

import org.scalatest.{Matchers, WordSpec}
import hmda.quarterly.data.api.route.rates.dti.MedianDTIFHAByRace


class MedianDTIFHAByRaceSpec extends WordSpec with Matchers {
val route = MedianDTIFHAByRace.getRoute
val routeSummary = MedianDTIFHAByRace.getSummary
"median dtifha by race route" should {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

"return the correct summary route" in {
assert(!routeSummary.isCompleted)
}
}
"median dtifha by race route" should {
"have a string title" in {
assert(route.title.isInstanceOf[String])
}
}
}
Loading