Created
July 20, 2010 17:36
-
-
Save ryansroberts/483264 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class When_searching_for_a_tag_by_name_with_two_matches : HandlerContext<IEnumerable<TagResource>, TagsController> | |
{ | |
Establish context = () => Stub<ISemaphoreService>() | |
.Setup(s => s.ByName(Moq.It.IsAny<string>())) | |
.Returns(new[] { new Term(1, "encoded term that is ambiguous"), | |
new Term(2, "encoded term that is ambiguous") }); | |
Because of = () => Get("tags/byname/encoded+term+that+is+ambiguous"); | |
It Has_a_resource_of_enumerable_tags = () => Has_expected_resource_type(); | |
It Has_returned_two_results = () => Resource.Count().ShouldEqual(2); | |
It Matches_the_second_searched_for_term = () => Resource.ElementAt(1).Id.ShouldEqual(2); | |
It Matches_the_second_semaphore_id = () => Resource.ElementAt(1).Id.ShouldEqual(2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment