public void Convert_IfRowKeyIsPrivate_Ignores() { // Arrange const string expectedPartitionKey = "PK"; IConverter <PocoWithPrivateRowKey, TableEntity> product = CreateProductUnderTest <PocoWithPrivateRowKey>(); PocoWithPrivateRowKey input = new PocoWithPrivateRowKey { PartitionKey = expectedPartitionKey, RowKeyPublic = "UnexpectedRK" }; // Act TableEntity actual = product.Convert(input); // Assert Assert.NotNull(actual); Assert.Null(actual.RowKey); Assert.AreSame(expectedPartitionKey, actual.PartitionKey); }
public void Convert_IfRowKeyIsPrivate_Ignores() { // Arrange const string expectedPartitionKey = "PK"; IConverter <ITableEntity, PocoWithPrivateRowKey> product = CreateProductUnderTest <PocoWithPrivateRowKey>(); DynamicTableEntity entity = new DynamicTableEntity { PartitionKey = expectedPartitionKey, RowKey = "UnexpectedRK" }; // Act PocoWithPrivateRowKey actual = product.Convert(entity); // Assert Assert.NotNull(actual); Assert.Null(actual.RowKeyPublic); Assert.Same(expectedPartitionKey, actual.PartitionKey); }