Esempio n. 1
0
 public PingRule Succeeds(RuleOption <TimesHelper.AllTimes, int> times, int?validResponseCode = 200)
 {
     Self.Times    = times;
     Self.Succeeds = true;
     Self.Return   = validResponseCode;
     return(this);
 }
Esempio n. 2
0
 public PingRule Fails(RuleOption <TimesHelper.AllTimes, int> times, RuleOption <Exception, int> errorState = null)
 {
     Self.Times    = times;
     Self.Succeeds = false;
     Self.Return   = errorState;
     return(this);
 }
Esempio n. 3
0
 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);
 }
Esempio n. 4
0
 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);
 }
Esempio n. 5
0
 public PingRule FailAlways(RuleOption <Exception, int> errorState = null) => Fails(TimesHelper.Always, errorState);
Esempio n. 6
0
 public ClientCallRule AfterSucceeds(RuleOption <Exception, int> errorState = null)
 {
     Self.AfterSucceeds = errorState;
     return(this);
 }