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