public void ToActionResultValue_Id_OkRequest() { var id = TransferData.GetTestTransfer().Id; var testTransfer = new ResultValue <TestEnum>(id); var actionResult = testTransfer.ToActionResultValue(); Assert.Equal(id, actionResult.Value); }
public async Task ToActionResultValueAsync_OkRequest() { var initialTransfer = TransferData.GetTestTransfer(); var testTransfer = ResultValueFactory.CreateTaskResultValue(initialTransfer); var actionResult = await testTransfer.ToActionResultValueTaskAsync <TestEnum, ITestTransfer>(); Assert.Equal(initialTransfer, actionResult.Value); }
public void ToActionResultValue_OkRequest() { var initialTransfer = TransferData.GetTestTransfer(); var testTransfer = new ResultValue <ITestTransfer>(initialTransfer); var actionResult = testTransfer.ToActionResultValue <TestEnum, ITestTransfer>(); Assert.Equal(initialTransfer, actionResult.Value); }