Exemple #1
0
    public void FromNSSetStrings()
    {
        string text        = "woot";
        var    arrayHandle = ObjC.ToNSSet(new[] { text });
        var    array       = ObjC.FromNSSet(arrayHandle);

        Assert.AreEqual(1, array.Length);
        Assert.AreEqual(text, array[0]);
    }
Exemple #2
0
    public void FromNSSet()
    {
        string text        = "woot";
        IntPtr handle      = ObjC.ToNSString(text);
        var    arrayHandle = ObjC.ToNSSet(new[] { handle });
        var    array       = ObjC.FromNSSet(arrayHandle);

        Assert.AreEqual(1, array.Length);
        Assert.AreEqual(text, array[0]);
    }
Exemple #3
0
    public void FromNSSetNullOfT()
    {
        var array = ObjC.FromNSSet <NSObject>(IntPtr.Zero);

        Assert.IsNull(array);
    }
Exemple #4
0
    public void FromNSSetNull()
    {
        var array = ObjC.FromNSSet(IntPtr.Zero);

        Assert.IsNull(array);
    }