16 lines
466 B
Go
16 lines
466 B
Go
package domain_test
|
|
|
|
import (
|
|
"git.cin.su/m/Assistant/contracts/capability"
|
|
"testing"
|
|
)
|
|
|
|
func TestStrategyUsesRiskAndCostSignals(t *testing.T) {
|
|
if got := (capability.StrategyRequest{RequiredQuality: 400, CostBudgetMicros: 10}).Select().Path; got != capability.PathRule {
|
|
t.Fatal(got)
|
|
}
|
|
if got := (capability.StrategyRequest{RiskClass: "HIGH", CostOfError: 900}).Select(); got.Path != capability.PathStrongLocal || !got.Escalate {
|
|
t.Fatalf("%#v", got)
|
|
}
|
|
}
|