Exemplo n.º 1
0
 public void WhenGettingPartitionKeyWithoutAnnotatedProperty_ThenThrows()
 => Assert.Throws <ArgumentException>(() => PartitionKeyAttribute.CreateAccessor <EntityWithoutAttributes>());
Exemplo n.º 2
0
 public void WhenGettingPartitionKey_ThenReturnsValue()
 => Assert.Equal("123", PartitionKeyAttribute.CreateAccessor <EntityWithAttributes>().Invoke(new EntityWithAttributes {
     PartitionKey = "123"
 }));
Exemplo n.º 3
0
 public void WhenGettingPartitionKeyWithInvalidChar_ThenThrows()
 => Assert.Throws <ArgumentException>(() => PartitionKeyAttribute.CreateAccessor <EntityWithAttributes>().Invoke(new EntityWithAttributes {
     PartitionKey = " \\ "
 }));
Exemplo n.º 4
0
 public void WhenGettingPartitionKeyWhitespacePropertyValue_ThenThrows()
 => Assert.Throws <ArgumentException>(() => PartitionKeyAttribute.CreateAccessor <EntityWithAttributes>().Invoke(new EntityWithAttributes {
     PartitionKey = "  "
 }));
Exemplo n.º 5
0
 public void WhenGettingPartitionKeyNullPropertyValue_ThenThrows()
 => Assert.Throws <ArgumentNullException>(() => PartitionKeyAttribute.CreateAccessor <EntityWithAttributes>().Invoke(new EntityWithAttributes()));
Exemplo n.º 6
0
 public void WhenGettingNonStringPartitionKey_ThenThrows()
 => Assert.Throws <ArgumentException>(() => PartitionKeyAttribute.CreateAccessor <EntityWithAttributesWrongTypes>());