-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
- Loading branch information
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System; | ||
using Reqnroll; | ||
|
||
// ReSharper disable once CheckNamespace | ||
namespace TechTalk.SpecFlow.Assist; | ||
|
||
public static class InstanceComparisonExtensionMethods | ||
{ | ||
|
||
public static void CompareToInstance<T>(this Table table, T instance) | ||
{ | ||
Reqnroll.InstanceComparisonExtensionMethods.CompareToInstance(table, instance); | ||
} | ||
|
||
/// <summary> | ||
/// Indicates whether the table is equivalent to the specified instance by comparing the values of all | ||
/// columns against the properties of the instance. Will return false after finding the first difference. | ||
/// </summary> | ||
public static bool IsEquivalentToInstance<T>(this Table table, T instance) | ||
{ | ||
return Reqnroll.InstanceComparisonExtensionMethods.IsEquivalentToInstance(table, instance) | ||
Check failure on line 21 in Plugins/Reqnroll.SpecFlowCompatibility.ReqnrollPlugin/Wrappers/InstanceComparisonExtensionMethods.cs GitHub Actions / build
Check failure on line 21 in Plugins/Reqnroll.SpecFlowCompatibility.ReqnrollPlugin/Wrappers/InstanceComparisonExtensionMethods.cs GitHub Actions / build
Check failure on line 21 in Plugins/Reqnroll.SpecFlowCompatibility.ReqnrollPlugin/Wrappers/InstanceComparisonExtensionMethods.cs GitHub Actions / build
Check failure on line 21 in Plugins/Reqnroll.SpecFlowCompatibility.ReqnrollPlugin/Wrappers/InstanceComparisonExtensionMethods.cs GitHub Actions / build
Check failure on line 21 in Plugins/Reqnroll.SpecFlowCompatibility.ReqnrollPlugin/Wrappers/InstanceComparisonExtensionMethods.cs GitHub Actions / build
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.Collections.Generic; | ||
using Reqnroll; | ||
|
||
// ReSharper disable once CheckNamespace | ||
namespace TechTalk.SpecFlow.Assist; | ||
|
||
public static class SetComparisonExtensionMethods | ||
{ | ||
public static void CompareToSet<T>(this Table table, IEnumerable<T> set, bool sequentialEquality = false) | ||
{ | ||
Reqnroll.SetComparisonExtensionMethods.CompareToSet(table, set, sequentialEquality); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// ReSharper disable once CheckNamespace | ||
namespace TechTalk.SpecFlow; | ||
public class Table(params string[] header) : Reqnroll.Table(header); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Reqnroll; | ||
using Reqnroll.Assist; | ||
|
||
// ReSharper disable once CheckNamespace | ||
namespace TechTalk.SpecFlow.Assist; | ||
|
||
public static class TableHelperExtensionMethods | ||
{ | ||
public static T CreateInstance<T>(this Table table) | ||
{ | ||
return Reqnroll.TableHelperExtensionMethods.CreateInstance<T>(table); | ||
} | ||
|
||
public static T CreateInstance<T>(this Table table, InstanceCreationOptions creationOptions) | ||
{ | ||
return Reqnroll.TableHelperExtensionMethods.CreateInstance<T>(table, creationOptions); | ||
} | ||
|
||
public static T CreateInstance<T>(this Table table, Func<T> methodToCreateTheInstance) | ||
{ | ||
return Reqnroll.TableHelperExtensionMethods.CreateInstance(table, methodToCreateTheInstance); | ||
} | ||
|
||
public static T CreateInstance<T>(this Table table, Func<T> methodToCreateTheInstance, InstanceCreationOptions creationOptions) | ||
{ | ||
return Reqnroll.TableHelperExtensionMethods.CreateInstance(table, methodToCreateTheInstance, creationOptions); | ||
} | ||
|
||
public static void FillInstance(this Table table, object instance) | ||
{ | ||
Reqnroll.TableHelperExtensionMethods.FillInstance(table, instance); | ||
} | ||
|
||
public static void FillInstance(this Table table, object instance, InstanceCreationOptions creationOptions) | ||
{ | ||
Reqnroll.TableHelperExtensionMethods.FillInstance(table, instance, creationOptions); | ||
} | ||
|
||
public static IEnumerable<T> CreateSet<T>(this Table table) | ||
{ | ||
return Reqnroll.TableHelperExtensionMethods.CreateSet<T>(table); | ||
} | ||
|
||
public static IEnumerable<T> CreateSet<T>(this Table table, InstanceCreationOptions creationOptions) | ||
{ | ||
return Reqnroll.TableHelperExtensionMethods.CreateSet<T>(table, creationOptions); | ||
} | ||
|
||
public static IEnumerable<T> CreateSet<T>(this Table table, Func<T> methodToCreateEachInstance) | ||
{ | ||
return Reqnroll.TableHelperExtensionMethods.CreateSet<T>(table, methodToCreateEachInstance); | ||
} | ||
|
||
public static IEnumerable<T> CreateSet<T>(this Table table, Func<T> methodToCreateEachInstance, InstanceCreationOptions creationOptions) | ||
{ | ||
return Reqnroll.TableHelperExtensionMethods.CreateSet<T>(table, methodToCreateEachInstance, creationOptions); | ||
} | ||
|
||
public static IEnumerable<T> CreateSet<T>(this Table table, Func<TableRow, T> methodToCreateEachInstance) | ||
{ | ||
return Reqnroll.TableHelperExtensionMethods.CreateSet<T>(table, methodToCreateEachInstance); | ||
} | ||
|
||
public static IEnumerable<T> CreateSet<T>(this Table table, Func<TableRow, T> methodToCreateEachInstance, InstanceCreationOptions creationOptions) | ||
{ | ||
return Reqnroll.TableHelperExtensionMethods.CreateSet<T>(table, methodToCreateEachInstance, creationOptions); | ||
} | ||
} |