public void GetCustomizationFromNullParamterThrows()
        {
            // Arrange
            var sut = new ModestAttribute();

            // Act & assert
            Assert.Throws <ArgumentNullException>(() =>
                                                  sut.GetCustomization(null));
        }
 public void GetCustomizationFromNullParamterThrows()
 {
     // Fixture setup
     var sut = new ModestAttribute();
     // Exercise system and verify outcome
     Assert.Throws<ArgumentNullException>(() =>
         sut.GetCustomization(null));
     // Teardown
 }
        public void SutIsAttribute()
        {
            // Arrange
            // Act
            var sut = new ModestAttribute();

            // Assert
            Assert.IsAssignableFrom <CustomizeAttribute>(sut);
        }
Exemple #4
0
        public void SutIsAttribute()
        {
            // Arrange
            // Act
            var sut = new ModestAttribute();

            // Assert
            Assert.IsInstanceOf <CustomizeAttribute>(sut);
        }
 public void SutIsAttribute()
 {
     // Fixture setup
     // Exercise system
     var sut = new ModestAttribute();
     // Verify outcome
     Assert.IsInstanceOf<CustomizeAttribute>(sut);
     // Teardown
 }
Exemple #6
0
        public void GetCustomizationFromNullParamterThrows()
        {
            // Fixture setup
            var sut = new ModestAttribute();

            // Exercise system and verify outcome
            Assert.Throws <ArgumentNullException>(() =>
                                                  sut.GetCustomization(null));
            // Teardown
        }
Exemple #7
0
        public void SutIsAttribute()
        {
            // Fixture setup
            // Exercise system
            var sut = new ModestAttribute();

            // Verify outcome
            Assert.IsAssignableFrom <CustomizeAttribute>(sut);
            // Teardown
        }
Exemple #8
0
        public void SutIsAttribute()
        {
            // Fixture setup
            // Exercise system
            var sut = new ModestAttribute();

            // Verify outcome
            Assert.IsInstanceOfType(sut, typeof(CustomizeAttribute));
            // Teardown
        }
        public void GetCustomizationReturnsCorrectResult()
        {
            // Arrange
            var sut       = new ModestAttribute();
            var parameter = typeof(TypeWithOverloadedMembers).GetMethod("DoSomething", new[] { typeof(object) }).GetParameters().Single();
            // Act
            var result = sut.GetCustomization(parameter);
            // Assert
            var invoker = Assert.IsAssignableFrom <ConstructorCustomization>(result);

            Assert.Equal(parameter.ParameterType, invoker.TargetType);
            Assert.IsAssignableFrom <ModestConstructorQuery>(invoker.Query);
        }
 public void GetCustomizationReturnsCorrectResult()
 {
     // Fixture setup
     var sut = new ModestAttribute();
     var parameter = typeof(TypeWithOverloadedMembers).GetMethod("DoSomething", new[] { typeof(object) }).GetParameters().Single();
     // Exercise system
     var result = sut.GetCustomization(parameter);
     // Verify outcome
     var invoker = Assert.IsAssignableFrom<ConstructorCustomization>(result);
     Assert.Equal(parameter.ParameterType, invoker.TargetType);
     Assert.IsAssignableFrom<ModestConstructorQuery>(invoker.Query);
     // Teardown
 }
Exemple #11
0
        public void GetCustomizationReturnsCorrectResult()
        {
            // Fixture setup
            var sut       = new ModestAttribute();
            var parameter = typeof(TypeWithOverloadedMembers).GetMethod("DoSomething", new[] { typeof(object) }).GetParameters().Single();
            // Exercise system
            var result = sut.GetCustomization(parameter);

            // Verify outcome
            Assert.IsAssignableFrom <ConstructorCustomization>(result);
            var invoker = (ConstructorCustomization)result;

            Assert.AreEqual(parameter.ParameterType, invoker.TargetType);
            Assert.IsAssignableFrom <ModestConstructorQuery>(invoker.Query);
            // Teardown
        }