public void AllBehaviorTypes () { TestRuntime.AssertSystemVersion (PlatformName.iOS, 7, 0, throwIfOtherPlatform: false); TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 9, throwIfOtherPlatform: false); // turns out there's 2 undocumented behaviors: colorOverDistance and valueOverDistance foreach (var type in CAEmitterBehavior.BehaviorTypes) { using (var eb = CAEmitterBehavior.Create (type)) { Assert.True (eb.Enabled, type + ".Enabled"); Assert.Null (eb.Name, type + ".Name"); Assert.That (eb.Type, Is.EqualTo ((string) type), type + ".Type"); } } }
public void AllBehaviorTypes() { if (!TestRuntime.CheckSystemAndSDKVersion(7, 0)) { Assert.Inconclusive("Requires iOS 7.0"); } // turns out there's 2 undocumented behaviors: colorOverDistance and valueOverDistance foreach (var type in CAEmitterBehavior.BehaviorTypes) { using (var eb = CAEmitterBehavior.Create(type)) { Assert.True(eb.Enabled, type + ".Enabled"); Assert.Null(eb.Name, type + ".Name"); Assert.That(eb.Type, Is.EqualTo((string)type), type + ".Type"); } } }
public void ValueOverDistance () { TestRuntime.AssertSystemVersion (PlatformName.iOS, 7, 0, throwIfOtherPlatform: false); TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 9, throwIfOtherPlatform: false); // undocumented - we'll track it over the betas :) using (var eb = CAEmitterBehavior.Create ((NSString) "valueOverDistance")) { Assert.True (eb.Enabled, "Enabled.1"); eb.Enabled = false; Assert.False (eb.Enabled, "Enabled.2"); Assert.Null (eb.Name, "Name.1"); eb.Name = "Xamarin"; Assert.That (eb.Name, Is.EqualTo ("Xamarin"), "Name.2"); Assert.That (eb.Type, Is.EqualTo ("valueOverDistance"), "Type"); } }
public void ValueOverDistance() { if (!TestRuntime.CheckSystemAndSDKVersion(7, 0)) { Assert.Inconclusive("Requires iOS 7.0"); } // undocumented - we'll track it over the betas :) using (var eb = CAEmitterBehavior.Create((NSString)"valueOverDistance")) { Assert.True(eb.Enabled, "Enabled.1"); eb.Enabled = false; Assert.False(eb.Enabled, "Enabled.2"); Assert.Null(eb.Name, "Name.1"); eb.Name = "Xamarin"; Assert.That(eb.Name, Is.EqualTo("Xamarin"), "Name.2"); Assert.That(eb.Type, Is.EqualTo("valueOverDistance"), "Type"); } }