コード例 #1
0
 public void WhenGettingRowKey_ThenReturnsValue()
 => Assert.Equal("asdf", RowKeyAttribute.CreateAccessor <EntityWithAttributes>().Invoke(new EntityWithAttributes {
     RowKey = "asdf"
 }));
コード例 #2
0
 public void WhenGettingRowKeyWithInvalidChar_ThenThrows()
 => Assert.Throws <ArgumentException>(() => RowKeyAttribute.CreateAccessor <EntityWithAttributes>().Invoke(new EntityWithAttributes {
     RowKey = "$\r\n"
 }));
コード例 #3
0
 public void WhenGettingRowKeyWhitespacePropertyValue_ThenThrows()
 => Assert.Throws <ArgumentException>(() => RowKeyAttribute.CreateAccessor <EntityWithAttributes>().Invoke(new EntityWithAttributes {
     RowKey = ""
 }));
コード例 #4
0
 public void WhenGettingRowKeyNullPropertyValue_ThenThrows()
 => Assert.Throws <ArgumentNullException>(() => RowKeyAttribute.CreateAccessor <EntityWithAttributes>().Invoke(new EntityWithAttributes()));
コード例 #5
0
 public void WhenGettingNonStringRowKey_ThenThrows()
 => Assert.Throws <ArgumentException>(() => RowKeyAttribute.CreateAccessor <EntityWithAttributesWrongTypes>());
コード例 #6
0
 public void WhenGettingRowKeyWithoutAnnotatedProperty_ThenThrows()
 => Assert.Throws <ArgumentException>(() => RowKeyAttribute.CreateAccessor <EntityWithoutAttributes>());