Esempio n. 1
0
        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
 }
Esempio n. 3
0
        public void SutIsAttribute()
        {
            // Arrange
            // Act
            var sut = new ModestAttribute();

            // Assert
            Assert.IsAssignableFrom <CustomizeAttribute>(sut);
        }
Esempio n. 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
 }
Esempio n. 6
0
        public void GetCustomizationFromNullParamterThrows()
        {
            // Fixture setup
            var sut = new ModestAttribute();

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

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

            // Verify outcome
            Assert.IsInstanceOfType(sut, typeof(CustomizeAttribute));
            // Teardown
        }
Esempio n. 9
0
        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);
        }
Esempio n. 10
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
     var invoker = Assert.IsAssignableFrom<ConstructorCustomization>(result);
     Assert.Equal(parameter.ParameterType, invoker.TargetType);
     Assert.IsAssignableFrom<ModestConstructorQuery>(invoker.Query);
     // Teardown
 }
Esempio n. 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
        }