public void GetContext()
 {
     using (var exp = new NSExpression(NSExpressionType.Block))
         using (var context = new NSExpression(NSExpressionType.EvaluatedObject))
             using (var fetch = NSFetchRequestExpression.FromFetch(exp, context, false))
                 Assert.NotNull(fetch.Context);
 }
 public void WeakFramework()
 {
     using (var exp = new NSExpression(NSExpressionType.Block))
         using (var context = new NSExpression(NSExpressionType.EvaluatedObject))
             using (var fetch = NSFetchRequestExpression.FromFetch(exp, context, false))
                 Assert.That(exp.Handle, Is.Not.EqualTo(IntPtr.Zero), "Handle");
 }
        public void GetIsCountOnly()
        {
            using (var exp = new NSExpression(NSExpressionType.Block))
                using (var context = new NSExpression(NSExpressionType.EvaluatedObject))
                    using (var fetch = NSFetchRequestExpression.FromFetch(exp, context, false))
                        Assert.IsFalse(fetch.IsCountOnly, "IsCountOnly was not correctly set to false.");

            using (var exp = new NSExpression(NSExpressionType.Block))
                using (var context = new NSExpression(NSExpressionType.EvaluatedObject))
                    using (var fetch = NSFetchRequestExpression.FromFetch(exp, context, true))
                        Assert.IsTrue(fetch.IsCountOnly, "IsCountOnly was not correctly set to true.");
        }