REST Web Api unit test endpoint validity with NUnit and Moq
I think you are confused about what a mock is actually supposed to be used for.  A mock is to create a fake object to pass into a parameter, and is very useful when testing systems that use dependency injection exclusively.

Take this for example:

public interface IFoo
{
     string SomeMethod(IBar bar);
}


public interfact IBar
{
    int CalculateSomething();
}


public class Foo : IFoo
{
     public string SomeMethod(IBar bar)
     {
         if (bar.CalculateSomething() &gt; 10)
         {
              // insert more code

              return "Completed";
         }

         return string.Empty;
     }
 }


One of your tests is to ensure the // insert more code section works.  To get into that code you need the IBar.CalculateSomething() to return a value > 10.  You also don't want to create an instance of the Bar class, because then you are not testing one unit of code. This is where mocking comes into play.  The way to make sure you hit the code is to pass a mock into the method, that is set up to pass the if statement

[Test]
public void EnsureThatInserMoreCodeWorks()
{
    var bar = Mock.Create&lt;IBar&gt;();
    bar.SetUp(b =&gt; b.CalculateSomething()).Returns(15);

    var sut = new Foo();

    var result = sut.SomeMethod(bar.Object);

    Assert.That(result, Is.EqualTo("Completed");
}


This is really simple, and I hope there is more to the // insert more code section to test, but this gives an easy to follow example of using mocks.

To make your test pass, you would simply have to pass in an invalid uri string.  No Mock needed.