public void Convert_IfETagIsStatic_Ignores() { // Arrange const string expectedPartitionKey = "PK"; IConverter <TableEntity, PocoWithStaticETag> product = CreateProductUnderTest <PocoWithStaticETag>(); TableEntity entity = new TableEntity { PartitionKey = expectedPartitionKey, ETag = new ETag("UnexpectedETag") }; // Act PocoWithStaticETag actual = product.Convert(entity); // Assert Assert.NotNull(actual); Assert.Null(PocoWithStaticETag.ETag); Assert.AreSame(expectedPartitionKey, actual.PartitionKey); }
public void Convert_IfETagIsStatic_Ignores() { // Arrange const string expectedPartitionKey = "PK"; IConverter <PocoWithStaticETag, TableEntity> product = CreateProductUnderTest <PocoWithStaticETag>(); PocoWithStaticETag.ETag = "UnexpectedETag"; PocoWithStaticETag input = new PocoWithStaticETag { PartitionKey = expectedPartitionKey }; // Act TableEntity actual = product.Convert(input); // Assert Assert.NotNull(actual); Assert.AreEqual(default(ETag), actual.ETag); Assert.AreSame(expectedPartitionKey, actual.PartitionKey); }