public void ShouldSetPropertyValues() { // Arrange // Act var att = new FunctionArgumentAttribute(1, "SomeFunction", typeof(int), "SomeProperty"); // Assert Assert.AreEqual(1, att.Ordinal); Assert.AreEqual("SomeFunction", att.Name); Assert.AreEqual(typeof(int), att.ReturnType); Assert.AreEqual("SomeProperty", att.PropertyName); }
public void ShouldThrowOnEmptyPropertyName() { // Arrange // Act _ = new FunctionArgumentAttribute(1, "SomeFunction", typeof(int), string.Empty); }
public void ShouldThrowOnNullPropertyName() { // Arrange // Act _ = new FunctionArgumentAttribute(1, "SomeFunction", typeof(int), null); }
public void ShouldThrowOnNullReturnType() { // Arrange // Act _ = new FunctionArgumentAttribute(1, "SomeFunction", null, "SomeProperty"); }
public void ShouldThrowOnNullFunctionName() { // Arrange // Act _ = new FunctionArgumentAttribute(1, null, typeof(int), "SomeProperty"); }
public void ShouldThrowOnOrdinalLessThanZero() { // Arrange // Act _ = new FunctionArgumentAttribute(-1, "SomeFunction", typeof(int), "SomeProperty"); }