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); }
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 }
public void GetCustomizationFromNullParamterThrows() { // Fixture setup var sut = new ModestAttribute(); // Exercise system and verify outcome Assert.Throws <ArgumentNullException>(() => sut.GetCustomization(null)); // Teardown }
public void SutIsAttribute() { // Fixture setup // Exercise system var sut = new ModestAttribute(); // Verify outcome Assert.IsAssignableFrom <CustomizeAttribute>(sut); // Teardown }
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 }
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 }