public void Put(string forecast) { var backendUrlVariableName = "backendUrl"; _policyBuilder .Inbound(builder => builder .Base() .SetVariable(backendUrlVariableName, NamedValue.Get("Backend")) .Create() ) .Backend(builder => builder .SetBackendService(ContextVariable.GetAsString(backendUrlVariableName)) .Base() .Create()) .Outbound() .OnError(); }
public void GetAsStringGeneratesCorrectPolicy(string variableName, bool strict, bool inline, string expected) { var policy = ContextVariable.GetAsString(variableName, strict, inline); policy.Should().Be(expected); }