Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Moq;
- using Xunit;
- namespace GithubGists
- {
- public class MockGist
- {
- [Fact]
- public void TestMock()
- {
- // Note this conditional expression...
- var foo = Mock.Of<IFoo>(f => f.Foo == "foo");
- Assert.Equal("foo", foo.Foo);
- }
- }
- public interface IFoo
- {
- string Foo { get; }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement