示例#1
0
        public void For_NoInnerInstanceHandles_ReturnsFalse([Frozen] IEnumerable <IGetTypeNameString> innerInstances,
                                                            [Frozen] CompositeGetTypeNameString sut,
                                                            Type type,
                                                            IFixture fixture)
        {
            // Arrange
            foreach (var innerInstance in innerInstances)
            {
                var typeName = "";
                innerInstance.For(type, out typeName).Returns(x =>
                {
                    x[1] = fixture.Create <string>();
                    return(false);
                });
            }

            var expectedResult = false;

            // Act
            string resultTypeName;
            var    result = sut.For(type, out resultTypeName);

            // Assert
            Assert.Equal(expectedResult, result);
        }
示例#2
0
        public void For_TypeHasNullGuard(CompositeGetTypeNameString sut)
        {
            // Arrange
            string @out;

            // Act
            // Assert
            Assert.Throws <ArgumentNullException>(() => sut.For(null, out @out));
        }
        public void For_TypeHasNullGuard(CompositeGetTypeNameString sut)
        {
            // Arrange
            string @out;

            // Act
            // Assert
            Assert.Throws<ArgumentNullException>(() => sut.For(null, out @out));
        }