Exemplo n.º 1
0
        public void Matches_returns_false_for_an_abstract_class()
        {
            var sut = new MayBeConstructedWithNewSpecification();

            Assert.That(() => sut.Matches(typeof(AbstractClass)), Is.False);
        }
Exemplo n.º 2
0
        public void Matches_returns_true_for_a_class_with_two_declared_constructors_where_one_is_parameterless()
        {
            var sut = new MayBeConstructedWithNewSpecification();

            Assert.That(() => sut.Matches(typeof(ParameterlessAndNonParameterlessConstructor)), Is.True);
        }
Exemplo n.º 3
0
        public void Matches_returns_false_for_a_class_with_one_declared_protected_parameterless_constructor()
        {
            var sut = new MayBeConstructedWithNewSpecification();

            Assert.That(() => sut.Matches(typeof(ProtectedConstructor)), Is.False);
        }
Exemplo n.º 4
0
        public void Matches_returns_true_for_a_class_with_no_declared_constructor()
        {
            var sut = new MayBeConstructedWithNewSpecification();

            Assert.That(() => sut.Matches(typeof(NoConstructor)), Is.True);
        }