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.

Enable unit testing for client libraries

See original GitHub issue

As requested by @stankovski and initially asked by @prabirshrestha

Create interface/virtual methods so we can easily write unit tests.

eg.

var fakeMsg = new Mock<CloudQueueMessage>();
var cloudQueue = A.Fake<ICloudQueue>();

etc…

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:1
  • Comments:25 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
pemari-msftcommented, Apr 12, 2016

Hi all – as you requested, we have unsealed all classes and virtualized all methods making service calls. We’ve verified that this enables mocking scenarios. Thanks for the request!

1reaction
moswaldcommented, Oct 9, 2015

I can’t believe we’re still waiting on this one.

I’m tired of writing my own wrapper IBlobClient and IBlobContainer objects.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unit testing an API client and wrappers
I've been going round in circles trying to figure out the best way to unit test an API client library I'm developing. The...
Read more >
HowTo Unit Test Client Server Code - java
4 Answers 4 · For your client/server project, include some mocking in your unit tests to ensure the object interfaces are working as...
Read more >
Testing API Libraries
If a good test server is available, start with integration tests · Not all API test servers are good · Integration tests can...
Read more >
unittest — Unit testing framework
It supports test automation, sharing of setup and shutdown code for tests, aggregation of tests into collections, and independence of the tests from...
Read more >
Test a .NET class library using Visual Studio
Learn how to use Visual Studio to create and run a unit test project for a .NET class library.
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