public void GetCustomizationFromNullParamterThrows() { // Arrange var sut = new GreedyAttribute(); // Act & Assert Assert.Throws <ArgumentNullException>(() => sut.GetCustomization(null)); }
public void SutIsAttribute() { // Arrange // Act var sut = new GreedyAttribute(); // Assert Assert.IsAssignableFrom <CustomizeAttribute>(sut); }
public void SutIsAttribute() { // Arrange // Act var sut = new GreedyAttribute(); // Assert Assert.IsInstanceOf <CustomizeAttribute>(sut); }
public void GetCustomizationFromNullParamterThrows() { // Fixture setup var sut = new GreedyAttribute(); // Exercise system and verify outcome Assert.Throws<ArgumentNullException>(() => sut.GetCustomization(null)); // Teardown }
public void SutIsAttribute() { // Fixture setup // Exercise system var sut = new GreedyAttribute(); // Verify outcome Assert.IsInstanceOf<CustomizeAttribute>(sut); // Teardown }
public void GetCustomizationFromNullParamterThrows() { // Fixture setup var sut = new GreedyAttribute(); // Exercise system and verify outcome Assert.Throws <ArgumentNullException>(() => sut.GetCustomization(null)); // Teardown }
public void SutIsAttribute() { // Fixture setup // Exercise system var sut = new GreedyAttribute(); // Verify outcome Assert.IsInstanceOf <CustomizeAttribute>(sut); // Teardown }
public void GetCustomizationReturnsCorrectResult() { // Arrange var sut = new GreedyAttribute(); 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 <GreedyConstructorQuery>(invoker.Query); }
public void GetCustomizationReturnsCorrectResult() { // Fixture setup var sut = new GreedyAttribute(); 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<GreedyConstructorQuery>(invoker.Query); // Teardown }
public void GetCustomizationReturnsCorrectResult() { // Fixture setup var sut = new GreedyAttribute(); 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 <GreedyConstructorQuery>(invoker.Query); // Teardown }