Пример #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>());