question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ReturnValue not set

See original GitHub issue

It seems like the ReturnValue of ICompletedFakeObjectCall is not being set. This test fails:

[Fact]
public void RetrnValueIsSet()
{
    var fake = A.Fake<IInterface>();

    var returnValue = fake.Function();

    Fake.GetCalls(fake).Single().ReturnValue.ShouldBe(returnValue);
}

public interface IInterface
{
    object Function();
}

Am I misunderstanding something - or is this a bug?

Using FakeItEasy version 5.4.0 on netcore 3.0.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
thomaslevesquecommented, Nov 13, 2019

Looks like a bug to me. I think it should contain the value that was effectively returned.

0reactions
blairconradcommented, Nov 14, 2019

Thanks for reporting it, @asgerhallas. We appreciate hearing of problems, especially with easy to follow reproduction.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Return value not set as intended when mocking a method ...
My test should with reason succeed as I'm giving a return value with mocker.return_value, which should give customers a value so the function ......
Read more >
[HttpWorker]HttpTrigger function responds with ...
If HTTP worker responds with res set, it works as expected: res value is returned in body of the response; ReturnValue is sent...
Read more >
Event: returnValue property - Web APIs | MDN
The Event property returnValue indicates whether the default action for this event has been prevented or not. It is set to true by...
Read more >
[Custom handler] Remove "Outputs not set on http ...
These are printed when the outputs or return value don't exist: Outputs not set on http response for invocationId... ReturnValue not set on...
Read more >
Re: Not able to set returnValue Object Keys
I receive the following error when trying to return an object from AppScript. Failed App Script type translation: Key 'Output' not found in ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found