Example #1
0
 public static IEnumerable <object[]> ValidValues()
 {
     return(TestCases.FromObject(
                "Foo",
                string.Empty,
                "Bar"));
 }
 public static IEnumerable <object?[]> InvalidValues()
 {
     return(TestCases.FromObject(
                "bar",
                123,
                12.3f));
 }
 public static IEnumerable <object?[]> ValidValues()
 {
     return(TestCases.FromObject(
                new List <object>(),
                Enumerable.Empty <object>(),
                Array.Empty <object>()));
 }
Example #4
0
 public static IEnumerable <object?[]> InvalidValues()
 {
     return(TestCases.FromObject(
                string.Empty,
                "foo",
                "bar"));
 }
 public static IEnumerable <object?[]> ValidValues()
 {
     return(TestCases.FromObject(
                new object[] { 10 },
                new object[] { 10, 11 },
                new object[] { "foo", 10 }));
 }
 public static IEnumerable <object[]> DummiesInContainer()
 {
     return(TestCases.FromObject(
                "dummy value",
                Task.FromResult(7),
                Task.WhenAll())); // creates a completed Task
 }
Example #7
0
 private static IEnumerable <object[]> AssertionsThatUseRepeated() =>
 TestCases.FromObject(
     "MustHaveHappened(Repeated.Never)",
     "MustHaveHappened(Repeated.Exactly.Once)",
     "MustHaveHappened(Repeated.AtLeast.Twice)",
     "MustHaveHappened(Repeated.NoMoreThan.Times(3))",
     "MustHaveHappened(Repeated.Like(Function(n) n < 3 Or n > 19))");
 public static IEnumerable <object?[]> ValidValues()
 {
     return(TestCases.FromObject(
                "comfortable",
                "portable",
                "immutable",
                "lorem ipsum table"));
 }
 public static IEnumerable <object?[]> InvalidValues()
 {
     return(TestCases.FromObject(
                "foo",
                "bar",
                "a",
                "b"));
 }
 public static IEnumerable <object[]> InvalidValues()
 {
     return(TestCases.FromObject(
                null,
                new object[] { },
                new object[] { null },
                new object[] { 1, 2, 3, "foo", "bar" }));
 }
 public static IEnumerable <object[]> NonCanceledTokens()
 {
     return(TestCases.FromObject(
                CancellationToken.None,
                default(CancellationToken),
                new CancellationToken(false),
                NonCanceledSource.Token));
 }
Example #12
0
 public static IEnumerable <object?[]> InvalidValues()
 {
     return(TestCases.FromObject(
                new object(),
                1,
                "foo",
                null));
 }
Example #13
0
 public static IEnumerable <object?[]> InvalidValues()
 {
     return(TestCases.FromObject(
                (object?)null,
                string.Empty,
                " ",
                "differentValue"));
 }
 public static IEnumerable <object?[]> InvalidValues()
 {
     return(TestCases.FromObject(
                (object?)null,
                Array.Empty <object>(),
                new object?[] { null },
                new object[] { 1, 2, 3, "foo", "bar" }));
 }
Example #15
0
 public static IEnumerable <object[]> ValidValues()
 {
     return(TestCases.FromObject(
                new[] { "a", "b", null, "y", "z" },
                new List <string> {
         "a", "b", null, "y", "z"
     }));
 }
Example #16
0
 public static IEnumerable <object[]> InvalidValues()
 {
     return(TestCases.FromObject(
                new object(),
                null,
                new[] { "one", "two" },
                new[] { "foo", "bar", "biz" }));
 }
Example #17
0
 public static IEnumerable <object?[]> ValidValues()
 {
     return(TestCases.FromObject(
                "bar",
                "barcode",
                "foo bar",
                "unbareable ;-)"));
 }
 public static IEnumerable <object[]> ValidValues()
 {
     return(TestCases.FromObject(
                "abc",
                "abcd",
                "abc abc",
                "abc lorem ipsum"));
 }
 public static IEnumerable <object?[]> InvalidValues()
 {
     return(TestCases.FromObject(
                9,
                11,
                null,
                "foo"));
 }
 public static IEnumerable <object?[]> InterceptableMethods()
 {
     return(TestCases.FromObject(
                new InterceptionTestCase(() => new object().ToString()),
                new InterceptionTestCase(() =>
                                         ((IBInterface)A.Fake <IAInterface>(builder => builder.Implements(typeof(IBInterface))))
                                         .Method())));
 }
Example #21
0
 public static IEnumerable <object[]> ValidValues()
 {
     return(TestCases.FromObject(
                new[] { 1, 2, 3 },
                new List <int> {
         1, 2, 3
     }));
 }
 public static IEnumerable <object?[]> ValidValues()
 {
     return(TestCases.FromObject(
                101,
                1000,
                78990,
                int.MaxValue));
 }
Example #23
0
 public static IEnumerable <object[]> InvalidValues()
 {
     return(TestCases.FromObject(
                new[] { "1", "2", "x", "y" },
                Array.Empty <string>(),
                null,
                new[] { "a", "b", null, "z", "x" },
                new[] { "a", "b" }));
 }
 public static IEnumerable <object[]> SupportedTypes()
 {
     return(TestCases.FromObject(
                typeof(IInterfaceType),
                typeof(AbstractClass),
                typeof(ClassWithProtectedConstructor),
                typeof(ClassWithInternalConstructor),
                typeof(InternalType)));
 }
Example #25
0
 public static IEnumerable <object[]> InvalidValues()
 {
     return(TestCases.FromObject(
                new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 },
                new int[] { },
                null,
                new[] { 1, 2, 3, 4 },
                new[] { 9, 8 }));
 }
Example #26
0
 public static IEnumerable <object[]> ValidValues()
 {
     return(TestCases.FromObject(
                new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 },
                new List <int> {
         1, 2, 3, 4, 5, 6, 7, 8, 9, 10
     },
                Enumerable.Range(1, 10)));
 }
Example #27
0
 public static IEnumerable <object?[]> InvalidValues()
 {
     return(TestCases.FromObject(
                new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 },
                Array.Empty <int>(),
                (object?)null,
                new[] { 1, 2, 3, 4 },
                new[] { 9, 8 }));
 }
 public static IEnumerable <object[]> InvalidValues()
 {
     return(TestCases.FromObject(
                null,
                new object(),
                Guid.NewGuid(),
                "FOO",
                " foo "));
 }
Example #29
0
 private static IEnumerable <object?[]> SupportedTypes()
 {
     return(TestCases.FromObject(
                new FakeCreator <IInterfaceType>(),
                new FakeCreator <AbstractClass>(),
                new FakeCreator <ClassWithProtectedConstructor>(),
                new FakeCreator <ClassWithInternalConstructorVisibleToDynamicProxy>(),
                new FakeCreator <InternalClassVisibleToDynamicProxy>()));
 }
Example #30
0
 public static IEnumerable <object[]> InvalidValues()
 {
     return(TestCases.FromObject(
                "rabbit",
                "apple",
                "bear",
                "chicken",
                "lorem ipsum",
                null));
 }