2020-12-18 13:45:06 +03:00
|
|
|
#if __MACOS__
|
2016-05-26 16:06:52 +03:00
|
|
|
using System;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
|
using AppKit;
|
|
|
|
using Foundation;
|
|
|
|
|
|
|
|
namespace Xamarin.Mac.Tests
|
|
|
|
{
|
|
|
|
[TestFixture]
|
2021-03-16 17:15:30 +03:00
|
|
|
[Preserve (AllMembers = true)]
|
2016-05-26 16:06:52 +03:00
|
|
|
public class NSOutlineViewTests
|
|
|
|
{
|
|
|
|
[Test]
|
|
|
|
public void NSOutlineView_InsertNull ()
|
|
|
|
{
|
|
|
|
NSOutlineView v = new NSOutlineView ();
|
|
|
|
v.BeginUpdates (); // We do this to prevent a crash: Insert/remove/move only works within a -beginUpdates/-endUpdates block or a View Based TableView
|
|
|
|
v.InsertItems (new NSIndexSet (0), null, NSTableViewAnimation.None);
|
|
|
|
v.EndUpdates ();
|
|
|
|
}
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
public void NSOutlineView_DelegateDataSourceNull ()
|
|
|
|
{
|
|
|
|
NSOutlineView v = new NSOutlineView ();
|
|
|
|
v.WeakDelegate = null;
|
|
|
|
v.Delegate = null;
|
|
|
|
v.WeakDataSource = null;
|
|
|
|
v.DataSource = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-18 13:45:06 +03:00
|
|
|
#endif // __MACOS__
|