public PingRule Succeeds(RuleOption <TimesHelper.AllTimes, int> times, int?validResponseCode = 200) { Self.Times = times; Self.Succeeds = true; Self.Return = validResponseCode; return(this); }
public PingRule Fails(RuleOption <TimesHelper.AllTimes, int> times, RuleOption <Exception, int> errorState = null) { Self.Times = times; Self.Succeeds = false; Self.Return = errorState; return(this); }
public ClientCallRule Fails(RuleOption <TimesHelper.AllTimes, int> times, RuleOption <Exception, int> errorState = null) { Self.Times = times; Self.Succeeds = false; Self.Return = errorState ?? new TheException(); return(this); }
public SniffRule Succeeds(RuleOption <TimesHelper.AllTimes, int> times, VirtualCluster cluster = null) { Self.Times = times; Self.Succeeds = true; Self.NewClusterState = cluster; Self.Return = 200; return(this); }
public PingRule FailAlways(RuleOption <Exception, int> errorState = null) => Fails(TimesHelper.Always, errorState);
public ClientCallRule AfterSucceeds(RuleOption <Exception, int> errorState = null) { Self.AfterSucceeds = errorState; return(this); }