public void NSAppearanceCustomizationNull() { Asserts.EnsureYosemite(); using (NSButton b = new NSButton()) b.SetAppearance(null); }
public void Setup() { Asserts.EnsureYosemite(); source = new NSViewController(); destination = new NSViewController(); segue = new NSStoryboardSegue("Test", source, destination); }
public void SetUp() { Asserts.EnsureYosemite(); if (Asserts.IsAtLeastElCapitan) { Asserts.Ensure64Bit(); } }
public void NSAppearanceShouldLoadAppearanceNamed() { Asserts.EnsureYosemite(); var appearance = NSAppearance.GetAppearance(NSAppearance.NameVibrantDark); Assert.IsNotNull(appearance, "NSAppearanceShouldLoadAppearanceNamed - Failed to initialize appearance VibrantDark"); Assert.AreEqual(appearance.Name, NSAppearance.NameVibrantDark.ToString(), "NSAppearanceShouldLoadAppearanceNamed - Appearance initialized with incorrect name."); }
public void SCNGeometrySource_BoneStringTests() // These were radar://17782603 { Asserts.EnsureYosemite(); #pragma warning disable 0219 SCNGeometrySource d = SCNGeometrySource.FromData(new NSData(), SCNGeometrySourceSemantic.BoneWeights, 1, false, 1, 1, 1, 1); d = SCNGeometrySource.FromData(new NSData(), SCNGeometrySourceSemantic.BoneIndices, 1, false, 1, 1, 1, 1); #pragma warning restore 0219 }
public void SCNNode_BackfaceCulling() { Asserts.EnsureYosemite(); if (IntPtr.Size == 8) { Assert.IsNotNull(SCNPhysicsTestKeys.BackfaceCullingKey); } }
public void NSTextViewShouldChangeUsesRolloverButtonForSelection() { Asserts.EnsureYosemite(); var usesRollover = view.UsesRolloverButtonForSelection; view.UsesRolloverButtonForSelection = !usesRollover; Assert.IsFalse(view.UsesRolloverButtonForSelection == usesRollover, "NSTextViewShouldChangeUsesRolloverButtonForSelection - Failed to set the UsesRolloverButtonForSelection property"); }
public void NSToolbarShouldChangeAllowsExtensionItems() { Asserts.EnsureYosemite(); var allows = toolbar.AllowsExtensionItems; toolbar.AllowsExtensionItems = !allows; Assert.IsFalse(toolbar.AllowsExtensionItems == allows, "NSToolbarShouldChangeAllowsExtensionItems - Failed to set the AllowsExtensionItems property"); }
public void NSTabViewItemShouldChangeViewController() { Asserts.EnsureYosemite(); var vc = item.ViewController; item.ViewController = new NSViewController(); Assert.IsFalse(item.ViewController == vc, "NSTabViewItemShouldChangeViewController - Failed to set the ViewController property"); }
public void NSTextFieldShouldChangePlaceholderAttributedString() { Asserts.EnsureYosemite(); var placeholder = textField.PlaceholderAttributedString; textField.PlaceholderAttributedString = new NSAttributedString("Test"); Assert.IsFalse(textField.PlaceholderAttributedString == placeholder, "NSTextFieldShouldChangePlaceholderAttributedString - Failed to set the PlaceholderAttributedString property"); }
public void NSTabViewItemShouldChangeImage() { Asserts.EnsureYosemite(); var image = item.Image; item.Image = new NSImage(); Assert.IsFalse(item.Image == image, "NSTabViewItemShouldChangeImage - Failed to set the Image property"); }
public void NSViewControllerShouldAddChildViewController() { Asserts.EnsureYosemite(); var child = new NSViewController(); controller.AddChildViewController(child); Assert.IsTrue(controller.ChildViewControllers.Length == 1, "NSViewControllerShouldAddChildViewControllers - Failed to add child view controller"); }
public void NSTableRowViewShouldChangeNextRowSelected() { Asserts.EnsureYosemite(); var selected = view.NextRowSelected; view.NextRowSelected = !selected; Assert.IsFalse(view.NextRowSelected == selected, "NSTableRowViewShouldChangeNextRowSelected - Failed to set the NextRowSelected property"); }
public void NSAppearanceShouldChangeCurrentAppearance() { Asserts.EnsureYosemite(); var appearance = NSAppearance.CurrentAppearance; NSAppearance.CurrentAppearance = NSAppearance.GetAppearance(NSAppearance.NameVibrantDark); Assert.AreNotEqual(appearance, NSAppearance.CurrentAppearance, "NSAppearanceShouldChangeCurrentAppearance - Failed to change appearance."); }
public void NSImageResizingModeShouldChange() { Asserts.EnsureYosemite(); var image = new NSImage(); image.ResizingMode = NSImageResizingMode.Stretch; Assert.AreEqual(image.ResizingMode, NSImageResizingMode.Stretch, "NSImageResizingMode - Was not equal to Stretch"); Assert.AreNotEqual(image.ResizingMode, NSImageResizingMode.Tile, "NSImageResizingMode - Was incorrectly equal to Tile"); }
public void NSTableColumnShouldChangeTitle() { Asserts.EnsureYosemite(); var title = column.Title; column.Title = "Test"; Assert.IsFalse(column.Title == title, "NSTableColumnShouldChangeTitle - Failed to set the Title property"); }
public void NSViewShouldChangeGestureRecognizers() { Asserts.EnsureYosemite(); var recognizers = view.GestureRecognizers; view.GestureRecognizers = new NSGestureRecognizer [] { new NSClickGestureRecognizer(), new NSPanGestureRecognizer() }; Assert.IsFalse(view.GestureRecognizers == recognizers); }
public void NSPathControlShouldSetEditable() { Asserts.EnsureYosemite(); var control = new NSPathControl(); var editable = control.Editable; control.Editable = !editable; Assert.IsTrue(control.Editable != editable, "NSPathControlShouldSetEditable - Failed to change the Editable property"); }
public void NSPathControlShouldSetPlaceholderAttributedString() { Asserts.EnsureYosemite(); var control = new NSPathControl(); var placeholderAttributedString = control.PlaceholderAttributedString; control.PlaceholderAttributedString = new NSAttributedString("Test Placeholder"); Assert.IsTrue(control.PlaceholderAttributedString != placeholderAttributedString, "NSPathControlShouldSetPlaceholderAttributedString - Failed to change PlaceholderAttributedString property"); }
public void NSPathControlShouldSetPathItems() { Asserts.EnsureYosemite(); var control = new NSPathControl(); var pathItems = control.PathItems; control.PathItems = new [] { new NSPathControlItem() }; Assert.IsTrue(control.PathItems != pathItems, "NSPathControlShouldSetPathItems - Failed to set PathItems property"); }
public void NSPathControlShouldSetAllowedTypes() { Asserts.EnsureYosemite(); var control = new NSPathControl(); var allowedTypes = control.AllowedTypes; control.AllowedTypes = new [] { (NSString)"exe", (NSString)"jpg" }; Assert.IsTrue(control.AllowedTypes != allowedTypes, "NSPathControlShouldSetAllowedTypes - Failed to change AllowedTypes property"); }
public void AVAudioIONodeTests_AudioUnitTest() { Asserts.EnsureYosemite(); AVAudioEngine eng = new AVAudioEngine(); AVAudioIONode node = eng.OutputNode; AUUnit unit = node.AudioUnit; unit.GetElementCount(AudioUnitScopeType.Global); // Make sure this doens't crash. }
public void NSControlShouldChangeHighlighted() { Asserts.EnsureYosemite(); var control = new NSButton(); var highlighted = control.Highlighted; control.Highlighted = !highlighted; Assert.IsFalse(highlighted == control.Highlighted); }
public void NSControlShouldChangeControlSize() { Asserts.EnsureYosemite(); var control = new NSButton(); var size = control.ControlSize; control.ControlSize = NSControlSize.Mini; Assert.IsFalse(size == control.ControlSize); Assert.IsTrue(control.ControlSize == NSControlSize.Mini); }
public void NSAppearanceCustomizationNull() { Asserts.EnsureYosemite(); using (NSButton b = new NSButton()) { #if NET b.Appearance = null; #else b.SetAppearance(null); #endif } }
public void NSControlShouldChangeLineBreakMode() { Asserts.EnsureYosemite(); var control = new NSButton(); var lineBreak = control.LineBreakMode; control.LineBreakMode = NSLineBreakMode.Clipping; Assert.IsTrue(control.LineBreakMode == NSLineBreakMode.Clipping); Assert.IsFalse(lineBreak == control.LineBreakMode); }
public void NSViewShouldRemoveGestureRecognizer() { Asserts.EnsureYosemite(); var recognizer = new NSClickGestureRecognizer(); view.AddGestureRecognizer(recognizer); Assert.IsTrue(view.GestureRecognizers.Length != 0, "NSViewShouldRemoveGestureRecognizer - Failed to add gesture recognizer"); view.RemoveGestureRecognizer(recognizer); Assert.IsTrue(view.GestureRecognizers.Length == 0, "NSViewShouldRemoveGestureRecognizer - Failed to remove gesture recognizer"); }
public void NSViewShouldAddGestureRecognizer() { Asserts.EnsureYosemite(); var length = 0; if (view.GestureRecognizers != null) { length = view.GestureRecognizers.Length; } view.AddGestureRecognizer(new NSGestureRecognizer()); Assert.IsTrue(view.GestureRecognizers.Length == length + 1, "NSViewShouldAddGestureRecognizer - Failed to add recognizer, count didn't change."); }
public void NSImageCapInsets() { Asserts.EnsureYosemite(); var image = new NSImage(); image.CapInsets = new NSEdgeInsets(5f, 6f, 7f, 8f); Assert.IsNotNull(image.CapInsets); Assert.IsTrue(image.CapInsets.Top == 5f, "NSImageCapInsets - Top value was not 5"); Assert.IsTrue(image.CapInsets.Left == 6f, "NSImageCapInsets - Left value was not 6"); Assert.IsTrue(image.CapInsets.Bottom == 7f, "NSImageCapInsets - Bottom value was not 7"); Assert.IsTrue(image.CapInsets.Right == 8f, "NSImageCapInsets - Right value was not 8"); }
public void NSViewControllerShouldInsertChildViewController() { Asserts.EnsureYosemite(); controller.AddChildViewController(new NSViewController()); controller.AddChildViewController(new NSViewController()); Assert.IsTrue(controller.ChildViewControllers.Length == 2, "NSViewControllerShouldInsertChildViewController - Failed to add child view controller"); var child = new NSViewController(); controller.InsertChildViewController(child, 1); Assert.IsTrue(controller.ChildViewControllers.Length == 3, "NSViewControllerShouldInsertChildViewController - Failed to insert child view controller"); Assert.IsTrue(controller.ChildViewControllers [1] == child, "NSViewControllerShouldInsertChildViewController - Inserted child view controller at the wrong index."); }