public void FrameworkElementExtensions_ArgumentChecks() { var element = new Button(); AssertEx.Throws <ArgumentNullException>( () => DependencyObjectExtensions.SetTag(null, 0), ex => Assert.AreEqual("view", ex.ParamName)); AssertEx.Throws <ArgumentNullException>( () => DependencyObjectExtensions.SetReactContext(null, null), ex => Assert.AreEqual("view", ex.ParamName)); AssertEx.Throws <ArgumentNullException>( () => DependencyObjectExtensions.GetTag(null), ex => Assert.AreEqual("view", ex.ParamName)); AssertEx.Throws <ArgumentNullException>( () => DependencyObjectExtensions.GetReactContext(null), ex => Assert.AreEqual("view", ex.ParamName)); }
public void FrameworkElementExtensions_ArgumentChecks() { ArgumentNullException ex1 = Assert.Throws <ArgumentNullException>( () => DependencyObjectExtensions.SetTag(null, 0)); Assert.AreEqual("view", ex1.ParamName); ArgumentNullException ex2 = Assert.Throws <ArgumentNullException>( () => DependencyObjectExtensions.SetReactContext(null, null)); Assert.AreEqual("view", ex2.ParamName); ArgumentNullException ex3 = Assert.Throws <ArgumentNullException>( () => DependencyObjectExtensions.GetTag(null)); Assert.AreEqual("view", ex3.ParamName); ArgumentNullException ex4 = Assert.Throws <ArgumentNullException>( () => DependencyObjectExtensions.GetReactContext(null)); Assert.AreEqual("view", ex4.ParamName); }