Exemplo n.º 1
0
        public static IEnumerable <object[]> GetEqualsTestData()
        {
            var name  = "foo";
            var value = "bar";
            var p1    = ComponentParameter.CreateParameter(name, value);
            var p2    = ComponentParameter.CreateParameter(name, value);
            var p3    = ComponentParameter.CreateCascadingValue(name, value);
            var p4    = ComponentParameter.CreateParameter(string.Empty, value);
            var p5    = ComponentParameter.CreateParameter(name, string.Empty);

            yield return(new object[] { p1, p1, true });

            yield return(new object[] { p1, p2, true });

            yield return(new object[] { p3, p3, true });

            yield return(new object[] { p1, p3, false });

            yield return(new object[] { p1, p4, false });

            yield return(new object[] { p1, p5, false });
        }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a cascading value which can be passed to a test contexts render methods.
 /// </summary>
 /// <param name="value">Value of the parameter</param>
 /// <returns>The <see cref="ComponentParameter"/>.</returns>
 public static ComponentParameter CascadingValue(object value)
 {
     return(ComponentParameter.CreateCascadingValue(null, value));
 }
Exemplo n.º 3
0
 public void Test001()
 {
     Should.Throw <ArgumentNullException>(() => ComponentParameter.CreateCascadingValue(null, null !));
     Should.Throw <ArgumentNullException>(() => { ComponentParameter p = (null, null, true); });
 }
Exemplo n.º 4
0
 /// <summary>
 /// Creates a cascading value which can be passed to a test contexts render methods.
 /// </summary>
 /// <param name="name">Parameter name</param>
 /// <param name="value">Value of the parameter</param>
 /// <returns>The <see cref="ComponentParameter"/>.</returns>
 public static ComponentParameter CascadingValue(string name, object value)
 {
     return(ComponentParameter.CreateCascadingValue(name, value));
 }