public void PositiveExplicitGenericInterfaceMethod()
        {
            IInterfaceWithGenericMethod i = new ExplicitGenericInterfaceMethodImplementation(0);

            foreach (var x in i.Bar <string>())
            {
            }
        }
 public void NegativeExplicitGenericInterfaceMethod2()
 {
     try
     {
         IInterfaceWithGenericMethod i = new ExplicitGenericInterfaceMethodImplementation(2);
         foreach (var x in i.Bar <string>())
         {
         }
         throw new Exception();
     }
     catch (TestRewriterMethods.PostconditionException e)
     {
         Assert.AreEqual(": Contract.Result<IEnumerable<T>>() != null", e.Message);
     }
 }
 public void NegativeExplicitGenericInterfaceMethod2()
 {
   try
   {
     IInterfaceWithGenericMethod i = new ExplicitGenericInterfaceMethodImplementation(2);
     foreach (var x in i.Bar<string>())
     {
     }
     throw new Exception();
   }
   catch (TestRewriterMethods.PostconditionException e)
   {
     Assert.AreEqual(": Contract.Result<IEnumerable<T>>() != null", e.Message);
   }
 }
    public void PositiveExplicitGenericInterfaceMethod()
    {
      IInterfaceWithGenericMethod i = new ExplicitGenericInterfaceMethodImplementation(0);
      foreach (var x in i.Bar<string>())
      {
      }

    }