Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Add more to MvcCoreServiceCollectionExtensionsTest #5564

Closed
wants to merge 3 commits into from

Conversation

dougbu
Copy link
Member

@dougbu dougbu commented Nov 23, 2016

@dougbu
Copy link
Member Author

dougbu commented Nov 23, 2016

/to @javiercn

@Eilon is this the type of testing you wanted to see?

{
// Arrange
var services = new ServiceCollection();
var mockManager = new Mock<ApplicationPartManager>(MockBehavior.Strict);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do so many mocks have to be added? Would it be enough to add 1 fake one, then 1 real one, and assert that the 1 real one (which was last) was retrieved?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decided to test 1 and 3 rather than 1 and 2. Either is fine and I'll remove the two extra lines in two tests.

@Eilon
Copy link
Member

Eilon commented Nov 24, 2016

To answer the main question: yes, this is pretty much what I had in mind!

@dougbu
Copy link
Member Author

dougbu commented Nov 24, 2016

🆙📅

@dougbu
Copy link
Member Author

dougbu commented Dec 6, 2016

48546db

@dougbu dougbu closed this Dec 6, 2016
@dougbu dougbu deleted the dougbu/lastservice.test branch December 6, 2016 04:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants