Exemple #1
0
 public void Create_IfTimestampIsNonDateTimeOffset_Throws()
 {
     // Act & Assert
     ExceptionAssert.ThrowsInvalidOperation(
         () => TableEntityToPocoConverter <PocoWithNonDateTimeOffsetTimestamp> .Create(),
         "If the Timestamp property is present, it must be a DateTimeOffset.");
 }
Exemple #2
0
 public void Create_IfPartitionKeyIsNonString_Throws()
 {
     // Act & Assert
     ExceptionAssert.ThrowsInvalidOperation(
         () => TableEntityToPocoConverter <PocoWithNonStringPartitionKey> .Create(),
         "If the PartitionKey property is present, it must be a String.");
 }
Exemple #3
0
 public void Create_IfPartitionKeyHasIndexParameters_Throws()
 {
     // Act & Assert
     ExceptionAssert.ThrowsInvalidOperation(
         () => TableEntityToPocoConverter <PocoWithIndexerPartitionKey> .Create(),
         "If the PartitionKey property is present, it must not be an indexer.");
 }
Exemple #4
0
        private static TableEntityToPocoConverter <TOutput> CreateProductUnderTest <TOutput>()
            where TOutput : new()
        {
            TableEntityToPocoConverter <TOutput> product = TableEntityToPocoConverter <TOutput> .Create();

            Assert.NotNull(product); // Guard
            return(product);
        }
Exemple #5
0
        public void Create_ReturnsInstance()
        {
            // Act
            IConverter <ITableEntity, Poco> converter = TableEntityToPocoConverter <Poco> .Create();

            // Assert
            Assert.NotNull(converter);
        }