Created
March 3, 2014 21:19
-
-
Save FilipDeVos/9334836 to your computer and use it in GitHub Desktop.
this breaks Resharper
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
// install-package fakeiteasy | |
// install-package shortbus.markers -pre | |
// install-package shortbus -pre | |
using FakeItEasy; | |
using ShortBus; | |
public class MyItem | |
{ | |
public string Name { get; set; } | |
} | |
public class MyItemQuery : ShortBus.IRequest<MyItem> | |
{ | |
public string Author { get; set; } | |
} | |
public class MyItemQueryHandler : ShortBus.IRequestHandler<MyItemQuery, MyItem> | |
{ | |
public MyItem Handle(MyItemQuery query) | |
{ | |
return new MyItem { Name = "Me" }; | |
} | |
} | |
public class Program | |
{ | |
public static void Main() | |
{ | |
var mediator = A.Fake<Mediator>(); | |
A.CallTo(() => mediator.Request<MyItem>(A<MyItemQuery>._).Data) | |
.Returns(new MyItem()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment