Exemplo n.º 1
0
        public void Test1(SomeClassWithOneConstructor obj)
        {
            Contract.Requires(obj != null);

            var str = obj.TheString_AsMethodCall(); // we should infer the postcondition

            Contract.Assert(str != null);           // no warning
        }
Exemplo n.º 2
0
        public void Test0(SomeClassWithOneConstructor obj)
        {
            Contract.Requires(obj != null);

            var str = obj.TheString;

            Contract.Assert(str != null); // no warning
        }
    public void Test1(SomeClassWithOneConstructor obj)
    {
      Contract.Requires(obj != null);

      var str = obj.TheString_AsMethodCall(); // we should infer the postcondition

      Contract.Assert(str != null); // no warning
    }
    public void Test0(SomeClassWithOneConstructor obj)
    {
      Contract.Requires(obj != null);

      var str = obj.TheString;

      Contract.Assert(str != null); // no warning
    }