You need to pass through the object instance of the mock
var mock = new Mock<IBar>();
var foo = new Foo(mock.Object);
You can also use the the mock object to access the methods of the instance.
mock.Object.GetFoo();
moq docs
You need to pass through the object instance of the mock
var mock = new Mock<IBar>();
var foo = new Foo(mock.Object);
You can also use the the mock object to access the methods of the instance.
mock.Object.GetFoo();
moq docs