public void Passes_When_AnyGetOnlyProperty_Was_Arranged() { var expected = _fixture.Create <List <int> >(); _anyInterfaceDependency1.Arrange(x => x.AnyGetOnlyProperty).Return(expected); var actual = _testObject.AnyGetOnlyProperty_With_Call(); _anyInterfaceDependency1.Verify(); Assert.Equal(expected, actual); }
public void Passes_With_Multiple_Dependency_Arrangements() { _anyInterfaceDependency1.Arrange(x => x.AnyGetOnlyProperty).Return(_value01); _anyInterfaceDependency2.Arrange(x => x.AnyGetOnlyProperty).Return(_value02); _anyInterfaceDependency3.Arrange(x => x.AnyGetOnlyProperty).Return(_value03); _anyInterfaceDependency1.Arrange(x => x.AnyGetSetProperty).Return(_value04); _anyInterfaceDependency2.Arrange(x => x.AnyGetSetProperty).Return(_value05); _anyInterfaceDependency3.Arrange(x => x.AnyGetSetProperty).Return(_value06); _anyInterfaceDependency1.Arrange(x => x.AnyMethodWithSingleGenericType <int>()); _anyInterfaceDependency2.Arrange(x => x.AnyMethodWithSingleGenericType <char>()); _anyInterfaceDependency3.Arrange(x => x.AnyMethodWithSingleGenericType <int>()); _anyInterfaceDependency1.Arrange(x => x.AnyMethodWithMultipleGenericTypes <int, char>()); _anyInterfaceDependency2.Arrange(x => x.AnyMethodWithMultipleGenericTypes <char, int>()); _anyInterfaceDependency3.Arrange(x => x.AnyMethodWithMultipleGenericTypes <int, char>()); _anyInterfaceDependency1.Arrange(x => x.AnyMethodWithReturnValue()).Return(_value07); _anyInterfaceDependency2.Arrange(x => x.AnyMethodWithReturnValue()).Return(_value08); _anyInterfaceDependency3.Arrange(x => x.AnyMethodWithReturnValue()).Return(_value09); _anyInterfaceDependency1.Arrange(x => x.AnyMethodWithReturnValueAndParams(_value01, _value04, _value07)).Return(_value10); _anyInterfaceDependency2.Arrange(x => x.AnyMethodWithReturnValueAndParams(_value02, _value05, _value08)).Return(_value11); _anyInterfaceDependency3.Arrange(x => x.AnyMethodWithReturnValueAndParams(_value03, _value06, _value09)).Return(_value12); _anyInterfaceDependency1.Arrange(x => x.AnyMethodVoid()); _anyInterfaceDependency2.Arrange(x => x.AnyMethodVoid()); _anyInterfaceDependency3.Arrange(x => x.AnyMethodVoid()); _anyInterfaceDependency1.Arrange(x => x.AnyMethodVoidWithParams(_value10, _value04, _value07)); _anyInterfaceDependency2.Arrange(x => x.AnyMethodVoidWithParams(_value02, _value11, _value08)); _anyInterfaceDependency3.Arrange(x => x.AnyMethodVoidWithParams(_value03, _value06, _value12)); _testObject.AnyMethodUnderTest_With_Multiple_Dependency_Calls <int, char>(); _anyInterfaceDependency1.Verify(); _anyInterfaceDependency2.Verify(); _anyInterfaceDependency3.Verify(); }