Open lpintorj opened 2 years ago
I know I could create adapters/wrappers to solve it. By the way I did. But I want to know if I could implement this unit test without adapters/wrappers.
Hmm, there's not a way to currently do this - it's pretty internal because even if we exposed it all the downstream properties are further blocks to make use of the result. Which members of ConditionResult
are you wanting to access in the end?
The need is to 1) create an instance that is not tied to a real multiplexer, and 2) stub the value of WasSatisfied
. As an abstraction, ITransaction
members should also return abstractions.
public interface IConditionResult
{
bool WasSatisfied { get; }
}
Good evening. How do I mock the method
AddCondition
fromITransaction
?My class:
My unit test:
I cannot create an instance of
ConditionResult
because the constructor isinternal
. See line 827 of Condition.csMany thanks.