コード例 #1
0
        public void CanPopulateThrowsExceptionWithNullType()
        {
            var sut           = new EnumerableTypeCreator();
            var configuration = Substitute.For <IBuildConfiguration>();

            Action action = () => sut.CanPopulate(configuration, null !, (Type)null !);

            action.Should().Throw <ArgumentNullException>();
        }
コード例 #2
0
        public void CanPopulateReturnsWhetherTypeIsSupportedTest(Type type, bool supported)
        {
            var configuration = Substitute.For <IBuildConfiguration>();

            var sut = new EnumerableTypeCreator();

            var actual = sut.CanPopulate(configuration, null !, type);

            actual.Should().Be(supported);
        }
コード例 #3
0
        public void CanPopulateThrowsExceptionWithNullTypeTest()
        {
            var target = new EnumerableTypeCreator();

            Action action = () => target.CanPopulate(null, null, null);

            action.ShouldThrow<ArgumentNullException>();
        }
コード例 #4
0
        public void CanPopulateReturnsWhetherTypeIsSupportedTest(Type type, bool supported)
        {
            var target = new EnumerableTypeCreator();

            var actual = target.CanPopulate(type, null, null);

            actual.Should().Be(supported);
        }