Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. using Moq;
  2. using Xunit;
  3.  
  4. namespace GithubGists
  5. {
  6. public class MockGist
  7. {
  8. [Fact]
  9. public void TestMock()
  10. {
  11. // Note this conditional expression...
  12. var foo = Mock.Of<IFoo>(f => f.Foo == "foo");
  13. Assert.Equal("foo", foo.Foo);
  14. }
  15.  
  16. }
  17.  
  18. public interface IFoo
  19. {
  20. string Foo { get; }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement