public void WhenGettingRowKey_ThenReturnsValue() => Assert.Equal("asdf", RowKeyAttribute.CreateAccessor <EntityWithAttributes>().Invoke(new EntityWithAttributes { RowKey = "asdf" }));
public void WhenGettingRowKeyWithInvalidChar_ThenThrows() => Assert.Throws <ArgumentException>(() => RowKeyAttribute.CreateAccessor <EntityWithAttributes>().Invoke(new EntityWithAttributes { RowKey = "$\r\n" }));
public void WhenGettingRowKeyWhitespacePropertyValue_ThenThrows() => Assert.Throws <ArgumentException>(() => RowKeyAttribute.CreateAccessor <EntityWithAttributes>().Invoke(new EntityWithAttributes { RowKey = "" }));
public void WhenGettingRowKeyNullPropertyValue_ThenThrows() => Assert.Throws <ArgumentNullException>(() => RowKeyAttribute.CreateAccessor <EntityWithAttributes>().Invoke(new EntityWithAttributes()));
public void WhenGettingNonStringRowKey_ThenThrows() => Assert.Throws <ArgumentException>(() => RowKeyAttribute.CreateAccessor <EntityWithAttributesWrongTypes>());
public void WhenGettingRowKeyWithoutAnnotatedProperty_ThenThrows() => Assert.Throws <ArgumentException>(() => RowKeyAttribute.CreateAccessor <EntityWithoutAttributes>());