コード例 #1
0
        public void CanPopulateReturnsWhetherTypeIsSupportedTest(Type type, bool supported)
        {
            var target = new ArrayTypeCreator();

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

            actual.Should().Be(supported);
        }
コード例 #2
0
        public void CanPopulateThrowsExceptionWithNullType()
        {
            var configuration = Substitute.For <IBuildConfiguration>();

            var sut = new ArrayTypeCreator();

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

            action.Should().Throw <ArgumentNullException>();
        }
コード例 #3
0
        public void CanPopulateReturnsWhetherTypeIsSupportedTest(Type type, bool supported)
        {
            _output.WriteLine("Testing " + type.FullName);

            var configuration = Substitute.For <IBuildConfiguration>();

            var sut = new ArrayTypeCreator();

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

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

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

            action.ShouldThrow<ArgumentNullException>();
        }