public void PositiveImplicitGenericInterfaceMethod() { var i = new ImplicitGenericInterfaceMethodImplementation(0); foreach (var x in i.Bar <string>()) { } }
public void NegativeImplicitGenericInterfaceMethod2() { try { var i = new ImplicitGenericInterfaceMethodImplementation(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 NegativeImplicitGenericInterfaceMethod2() { try { var i = new ImplicitGenericInterfaceMethodImplementation(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 PositiveImplicitGenericInterfaceMethod() { var i = new ImplicitGenericInterfaceMethodImplementation(0); foreach (var x in i.Bar<string>()) { } }