9 instantiations of TestObject
Microsoft.AspNetCore.Shared.Tests (9)
ObjectMethodExecutorTest.cs (9)
18
private TestObject _targetObject = new
TestObject
();
59
var parameter = new
TestObject
();
72
var parameter = new
TestObject
();
107
var parameter = new
TestObject
();
120
var parameter = new
TestObject
();
137
var parameter = new
TestObject
();
437
return new
TestObject
() { value = "Hello" };
483
return Task.FromResult<TestObject>(new
TestObject
() { value = "Hello" });
537
return new TestAwaitable<TestObject>(new
TestObject
52 references to TestObject
Microsoft.AspNetCore.Shared.Tests (52)
ObjectMethodExecutorTest.cs (52)
18
private
TestObject
_targetObject = new TestObject();
19
private TypeInfo targetTypeInfo = typeof(
TestObject
).GetTypeInfo();
50
var
resultObject = Assert.IsType<
TestObject
>(result);
59
var
parameter = new TestObject();
63
var
resultObject = Assert.IsType<
TestObject
>(result);
72
var
parameter = new TestObject();
98
var
resultObject = Assert.IsType<
TestObject
>(result);
107
var
parameter = new TestObject();
111
var
resultObject = Assert.IsType<
TestObject
>(result);
120
var
parameter = new TestObject();
129
[InlineData(nameof(
TestObject
.ValueMethodWithReturnVoidThrowsExceptionAsync))]
130
[InlineData(nameof(
TestObject
.ValueMethodWithReturnVoidValueTaskThrowsExceptionAsync))]
131
[InlineData(nameof(
TestObject
.ValueMethodWithReturnUnitThrowsExceptionAsync))]
132
[InlineData(nameof(
TestObject
.ValueMethodWithReturnValueTaskOfUnitThrowsExceptionAsync))]
133
[InlineData(nameof(
TestObject
.ValueMethodWithReturnFSharpAsyncOfUnitThrowsExceptionAsync))]
137
var
parameter = new TestObject();
169
var
result = await (TestAwaitable<
TestObject
>)executor.Execute(_targetObject, new object[] { "Hello", 123 });
173
Assert.Same(typeof(
TestObject
), executor.AsyncResultType);
204
Assert.Same(typeof(
TestObject
), executor.AsyncResultType);
206
Assert.IsType<
TestObject
>(result);
207
Assert.Equal("Hello 123", ((
TestObject
)result).value);
228
[InlineData(nameof(
TestObject
.VoidValueMethodAsync))]
229
[InlineData(nameof(
TestObject
.VoidValueTaskMethodAsync))]
230
[InlineData(nameof(
TestObject
.TaskOfUnitMethodAsync))]
231
[InlineData(nameof(
TestObject
.ValueTaskOfUnitMethodAsync))]
232
[InlineData(nameof(
TestObject
.FSharpAsyncOfUnitMethod))]
412
var method = typeof(
TestObject
).GetMethod(methodName);
418
var method = typeof(
TestObject
).GetMethod(methodName);
435
public
TestObject
ValueMethodWithReturnType(int i)
440
public
TestObject
ValueMethodWithReturnTypeThrowsException(
TestObject
i)
445
public
TestObject
ValueMethodUpdateValue(
TestObject
parameter)
481
public Task<
TestObject
> ValueMethodWithReturnTypeAsync(int i)
483
return Task.FromResult<
TestObject
>(new TestObject() { value = "Hello" });
486
public async Task ValueMethodWithReturnVoidThrowsExceptionAsync(
TestObject
i)
492
public async Task<Unit> ValueMethodWithReturnUnitThrowsExceptionAsync(
TestObject
i)
498
public async ValueTask ValueMethodWithReturnVoidValueTaskThrowsExceptionAsync(
TestObject
i)
504
public async ValueTask<Unit> ValueMethodWithReturnValueTaskOfUnitThrowsExceptionAsync(
TestObject
i)
510
public FSharpAsync<Unit> ValueMethodWithReturnFSharpAsyncOfUnitThrowsExceptionAsync(
TestObject
i)
521
public async Task<
TestObject
> ValueMethodWithReturnTypeThrowsExceptionAsync(
TestObject
i)
527
public Task<
TestObject
> ValueMethodUpdateValueAsync(
TestObject
parameter)
530
return Task.FromResult<
TestObject
>(parameter);
533
public TestAwaitable<
TestObject
> CustomAwaitableOfReferenceTypeAsync(
537
return new TestAwaitable<
TestObject
>(new TestObject