feat: Adds furnace heating interpolations.
All checks were successful
CI / Ubuntu (push) Successful in 11m23s
All checks were successful
CI / Ubuntu (push) Successful in 11m23s
This commit is contained in:
@@ -159,6 +159,51 @@ struct ManualSTests {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
func furnaceInterpolation() async throws {
|
||||
try await withDependencies {
|
||||
$0.manualS = .liveValue
|
||||
} operation: {
|
||||
@Dependency(\.manualS) var manualS
|
||||
|
||||
let response = try await manualS.furnaceInterpolation(
|
||||
.init(
|
||||
elevation: nil,
|
||||
winterDesignTemperature: 5,
|
||||
heatLoss: 49667,
|
||||
inputRating: 60000,
|
||||
afue: 96
|
||||
)
|
||||
)
|
||||
|
||||
#expect(response.failed == false)
|
||||
#expect(response.capacityAsPercentOfLoad == 116)
|
||||
#expect(response.outputCapacity == 57600)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
func furnaceInterpolation_with_oversizedFurnace() async throws {
|
||||
try await withDependencies {
|
||||
$0.manualS = .liveValue
|
||||
} operation: {
|
||||
@Dependency(\.manualS) var manualS
|
||||
|
||||
let response = try await manualS.furnaceInterpolation(
|
||||
.init(
|
||||
elevation: nil,
|
||||
winterDesignTemperature: 5,
|
||||
heatLoss: 49667,
|
||||
inputRating: 160_000,
|
||||
afue: 96
|
||||
)
|
||||
)
|
||||
|
||||
#expect(response.failed)
|
||||
#expect(response.failures == ["Oversizing failure."])
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
func balancePoint() async throws {
|
||||
try await withDependencies {
|
||||
|
||||
Reference in New Issue
Block a user