Exemple #1
0
        public void For_TypeHasNullGuard(DefaultGetTypeNameString sut)
        {
            // Arrange
            string @out;

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

            // Act
            // Assert
            Assert.Throws<ArgumentNullException>(() => sut.For(null, out @out));
        }
Exemple #3
0
        public void For_ReturnsTrueAndTypeName(DefaultGetTypeNameString sut)
        {
            // Arrange
            var type = typeof(AutoNSubstituteDataAttribute);

            var expectedResult   = true;
            var expectedTypeName = "AutoNSubstituteDataAttribute";

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

            // Assert
            Assert.True(result);

            Assert.Equal(expectedTypeName, resultTypeName);
        }
        public void For_ReturnsTrueAndTypeName(DefaultGetTypeNameString sut)
        {
            // Arrange
            var type = typeof(AutoNSubstituteDataAttribute);

            var expectedResult = true;
            var expectedTypeName = "AutoNSubstituteDataAttribute";

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

            // Assert
            Assert.True(result);

            Assert.Equal(expectedTypeName, resultTypeName);
        }
Exemple #5
0
 public void Constructor_ReturnsIGetTypeNameString(DefaultGetTypeNameString sut)
 {
     Assert.IsAssignableFrom <IGetTypeNameString>(sut);
 }
 public void Constructor_ReturnsIGetTypeNameString(DefaultGetTypeNameString sut)
 {
     Assert.IsAssignableFrom<IGetTypeNameString>(sut);
 }