Class MockComputationCollection
Represents a collection of computations used by the mocked context
Inheritance
Implements
Inherited Members
Namespace: NMF.Transformations.Tests
Assembly: NMF.Transformations.dll
Syntax
public class MockComputationCollection : ObservableCollection<ITraceEntry>, IList<ITraceEntry>, ICollection<ITraceEntry>, IReadOnlyList<ITraceEntry>, IReadOnlyCollection<ITraceEntry>, IEnumerable<ITraceEntry>, IList, ICollection, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged
Constructors
| Edit this page View SourceMockComputationCollection(MockContext)
Creates a new mock computation collection for the given mocked context
Declaration
public MockComputationCollection(MockContext context)
Parameters
Type | Name | Description |
---|---|---|
MockContext | context | The mock context in which to create the computation collection |
Methods
| Edit this page View SourceAdd(GeneralTransformationRule, object[])
Creates a computation mock for the given transformation rule with the given input and the given context and adds the computation to the context
Declaration
public MockComputation Add(GeneralTransformationRule transformationRule, object[] input)
Parameters
Type | Name | Description |
---|---|---|
GeneralTransformationRule | transformationRule | The transformation rule for this computation mock |
object[] | input | The input for this computation |
Returns
Type | Description |
---|---|
MockComputation | The computation mock |
Add<TIn>(GeneralTransformationRule<TIn>, TIn)
Creates a computation mock for the given transformation rule with the given input and the given context and adds the computation to the context
Declaration
public MockComputation Add<TIn>(GeneralTransformationRule<TIn> transformationRule, TIn input) where TIn : class
Parameters
Type | Name | Description |
---|---|---|
GeneralTransformationRule<TIn> | transformationRule | The transformation rule for this computation mock |
TIn | input | The input for this computation |
Returns
Type | Description |
---|---|
MockComputation | The computation mock |
Type Parameters
Name | Description |
---|---|
TIn |
Add<TOut>(TransformationRuleBase<TOut>, object[], TOut)
Creates a computation mock for the given transformation rule with the given input and the given context and adds the computation to the context
Declaration
public MockComputation Add<TOut>(TransformationRuleBase<TOut> transformationRule, object[] input, TOut output) where TOut : class
Parameters
Type | Name | Description |
---|---|---|
TransformationRuleBase<TOut> | transformationRule | The transformation rule for this computation mock |
object[] | input | The input for this computation |
TOut | output | The output of the mock computation |
Returns
Type | Description |
---|---|
MockComputation | The computation mock |
Type Parameters
Name | Description |
---|---|
TOut |
Add<TIn1, TIn2>(GeneralTransformationRule<TIn1, TIn2>, TIn1, TIn2)
Creates a computation mock for the given transformation rule with the given input and the given context and adds the computation to the context
Declaration
public MockComputation Add<TIn1, TIn2>(GeneralTransformationRule<TIn1, TIn2> transformationRule, TIn1 input1, TIn2 input2) where TIn1 : class where TIn2 : class
Parameters
Type | Name | Description |
---|---|---|
GeneralTransformationRule<TIn1, TIn2> | transformationRule | The transformation rule for this computation mock |
TIn1 | input1 | The first input for this computation |
TIn2 | input2 | The second input for this computation |
Returns
Type | Description |
---|---|
MockComputation | The computation mock |
Type Parameters
Name | Description |
---|---|
TIn1 | |
TIn2 |
Add<TIn, TOut>(TransformationRuleBase<TIn, TOut>, TIn, TOut)
Creates a computation mock for the given transformation rule with the given input and the given context and adds the computation to the context
Declaration
public MockComputation Add<TIn, TOut>(TransformationRuleBase<TIn, TOut> transformationRule, TIn input, TOut output) where TIn : class where TOut : class
Parameters
Type | Name | Description |
---|---|---|
TransformationRuleBase<TIn, TOut> | transformationRule | The transformation rule for this computation mock |
TIn | input | The input for this computation |
TOut | output | The output for the mock computation |
Returns
Type | Description |
---|---|
MockComputation | The computation mock |
Type Parameters
Name | Description |
---|---|
TIn | |
TOut |
Add<TIn1, TIn2, TOut>(TransformationRuleBase<TIn1, TIn2, TOut>, TIn1, TIn2, TOut)
Creates a computation mock for the given transformation rule with the given input and the given context and adds the computation to the context
Declaration
public MockComputation Add<TIn1, TIn2, TOut>(TransformationRuleBase<TIn1, TIn2, TOut> transformationRule, TIn1 input1, TIn2 input2, TOut output) where TIn1 : class where TIn2 : class where TOut : class
Parameters
Type | Name | Description |
---|---|---|
TransformationRuleBase<TIn1, TIn2, TOut> | transformationRule | The transformation rule for this computation mock |
TIn1 | input1 | The first input for this computation |
TIn2 | input2 | The second input for this computation |
TOut | output | The output of the mock computation |
Returns
Type | Description |
---|---|
MockComputation | The computation mock |
Type Parameters
Name | Description |
---|---|
TIn1 | |
TIn2 | |
TOut |