title: reusing the same tests for different implementation
body: <p>Using xUnit.net what would be a clean (readable/understandable <em>and</em> maintainable) way to reuse the same test for multiple implementations of the same interface?  </p>
  
  <p>The <strong>act</strong> and <strong>assert</strong> part of my tests are always the same (because all implementations of the interface are supposed to behave the same). Just the SUT is different for each test run and for some  particular tests the <strong>arrange</strong> part is slightly different.</p>
  
  <p>For example I have multiple implementations (<code>MemoryRepository</code>, <code>FileReposity</code> ...) of the following interface.</p>
  
  <pre><code>interface IRepository
  {
      object GetById(string id);
      void Set(string id, object value);
  }
  </code></pre>
  
  <p>Now my tests are supposed to assure that all implementations behave the same:</p>
  
  <pre><code>// all implementations of IRepository must behave like this
  // so do this test for all implementations
  [Fact]
  public void GetRetrievesWhatWasPut()
  {
      IRepository sut = new MemoryRepository();
      sut.Set("key", 10);
      var result = sut.Get("key");
      result.Should().Be(10);
  }
  </code></pre>