public void Convert_IfPartitionKeyIsReadOnly_PopulatesPartitionKey() { // Arrange const string expectedPartitionKey = "PK"; IConverter <PocoWithReadOnlyPartitionKey, TableEntity> product = CreateProductUnderTest <PocoWithReadOnlyPartitionKey>(); PocoWithReadOnlyPartitionKey input = new PocoWithReadOnlyPartitionKey { WritePartitionKey = expectedPartitionKey }; // Act TableEntity actual = product.Convert(input); // Assert Assert.NotNull(actual); Assert.AreSame(expectedPartitionKey, actual.PartitionKey); }
public void Convert_IfPartitionKeyIsReadOnly_Ignores() { // Arrange const string expectedRowKey = "RK"; IConverter <TableEntity, PocoWithReadOnlyPartitionKey> product = CreateProductUnderTest <PocoWithReadOnlyPartitionKey>(); TableEntity entity = new TableEntity { RowKey = expectedRowKey }; // Act PocoWithReadOnlyPartitionKey actual = product.Convert(entity); // Assert Assert.NotNull(actual); Assert.AreSame(expectedRowKey, actual.RowKey); }