Beispiel #1
0
 private void UpdateThensList()
 {
     Thens.Clear();
     foreach (Then then in Rule.Thens)
     {
         Type          thenModelType = typeof(ThenViewModel <>).MakeGenericType(then.GetType());
         ThenViewModel thenViewModel = Container.GetExports(typeof(ThenViewModel <>).MakeGenericType(then.GetType()), null, null).FirstOrDefault()?.Value as ThenViewModel;
         if (thenViewModel != null)
         {
             thenModelType.GetMethod("SetModels").Invoke(thenViewModel, new object[] { this, then });
             Thens.Add(thenViewModel);
         }
     }
 }
Beispiel #2
0
 public DynamicEntityTests()
 {
     Then = new Thens();
 }
 public void Setup()
 {
     Then = new Thens();
 }
 public CodeCompletionFeatureSteps Then(string text)
 {
     Thens.Add(text);
     return(this);
 }
 public DictionaryConverterTests()
 {
     Given = new Givens();
     Then  = new Thens();
 }
Beispiel #6
0
 public void Setup()
 {
     Then = new Thens();
 }
 public void OnSetup()
 {
     Given = new Givens();
     Then = new Thens();
 }
Beispiel #8
0
 /// <summary>
 /// Invoke the given function, using the provided matcher to fail the scenario if it does not match the function output
 /// </summary>
 /// <param name="func">the function to invoke</param>
 /// <param name="matcher">the matcher to use</param>
 /// <returns>the next step containing the result of the function</returns>
 public ThenStep Then <T>(Func <T> func, IMatcher <T> matcher)
 {
     return(Thens.Then(Scenario, func, matcher));
 }
Beispiel #9
0
 /// <summary>
 /// Using the provided matcher to fail the scenario if it does not match the given actual value
 /// </summary>
 /// <param name="actual">the value to check</param>
 /// <param name="matcher">the matcher to use</param>
 /// <returns>the next step</returns>
 public ThenStep Then <T>(T actual, IMatcher <T> matcher)
 {
     return(Thens.Then(Scenario, actual, matcher));
 }
Beispiel #10
0
 /// <summary>
 /// Invoke the given fetcher, using the provided matcher to fail the scenario if it does not match the fetch result
 /// </summary>
 /// <param name="fetcher">the fetcher to invoke</param>
 /// <param name="matcher">the matcher to use</param>
 /// <returns>the next step</returns>
 public ThenStep Then <T>(IFetcher <T> fetcher, IMatcher <T> matcher)
 {
     return(Thens.Then(Scenario, fetcher, matcher));
 }
Beispiel #11
0
 /// <summary>
 /// Invoke the given action, failing the scenario if it throws an exception
 /// </summary>
 /// <param name="action">the action to invoke</param>
 /// <returns>the next step</returns>
 public ThenStep Then(Action action)
 {
     return(Thens.Then(Scenario, action));
 }
Beispiel #12
0
 public void OnSetup()
 {
     Given = new Givens();
     Then  = new Thens();
 }