public string ReturnMultipleReferenceParams(TestReferenceType a, TestReferenceType b) { return string.Format("{0} {1}", a.Id, b.Id); }
public TestReferenceType ReturnReferenceTypeParameter(TestReferenceType a) { return a; }
public long ReturnWithMultipleParameters(int a, long b, TestReferenceType c) { var result = a + b + c.Id; return result; }
public void Should_Handle_Multiple_Parameters_Mixed_Value_And_Reference_Types() { var callerInterface = GetCreatedObject(); var refType = new TestReferenceType { Id = 3 }; const int firstParameter = 1; const long secondParameter = 2L; var value = callerInterface.ReturnWithMultipleParameters(firstParameter, secondParameter, refType); Assert.That(value, Is.EqualTo(6)); }
public void Should_Handle_Multiple_Reference_Parameters() { var callerInterface = GetCreatedObject(); var param1 = new TestReferenceType { Id = 1, Name = "Test" }; var param2 = new TestReferenceType { Id = 3, Name = "Test" }; var result = callerInterface.ReturnMultipleReferenceParams(param1, param2); Assert.That(result, Is.EqualTo("1 3")); }
public void Should_Return_ReferenceType_Parameter_Given() { var callerInterface = GetCreatedObject(); var param = new TestReferenceType {Id = 3, Name = "Test"}; var value = callerInterface.ReturnReferenceTypeParameter(param); Assert.That(value.Id, Is.EqualTo(3)); Assert.That(value.Name, Is.EqualTo("Test")); }