@@ -25,67 +25,72 @@ public void Create_ReturnsInstance()
2525 public void Create_IfPartitionKeyIsNonString_Throws ( )
2626 {
2727 // Act & Assert
28- ExceptionAssert . ThrowsInvalidOperation (
29- ( ) => new PocoToTableEntityConverter < PocoWithNonStringPartitionKey > ( ) ,
30- "If the PartitionKey property is present, it must be a String." ) ;
28+ var exception = Assert . Throws < InvalidOperationException > ( ( ) => new PocoToTableEntityConverter < PocoWithNonStringPartitionKey > ( ) ) ;
29+
30+ Assert . AreEqual ( "If the PartitionKey property is present, it must be a String." , exception . Message ) ;
3131 }
3232
3333 [ Test ]
3434 public void Create_IfPartitionKeyHasIndexParameters_Throws ( )
3535 {
3636 // Act & Assert
37- ExceptionAssert . ThrowsInvalidOperation (
38- ( ) => new PocoToTableEntityConverter < PocoWithIndexerPartitionKey > ( ) ,
39- "If the PartitionKey property is present, it must not be an indexer." ) ;
37+ var exception = Assert . Throws < InvalidOperationException > ( ( ) => new PocoToTableEntityConverter < PocoWithIndexerPartitionKey > ( ) ) ;
38+
39+ Assert . AreEqual ( exception . Message , "If the PartitionKey property is present, it must not be an indexer." ) ;
4040 }
4141
4242 [ Test ]
4343 public void Create_IfRowKeyIsNonString_Throws ( )
4444 {
4545 // Act & Assert
46- ExceptionAssert . ThrowsInvalidOperation ( ( ) => new PocoToTableEntityConverter < PocoWithNonStringRowKey > ( ) ,
47- "If the RowKey property is present, it must be a String." ) ;
46+ var exception = Assert . Throws < InvalidOperationException > ( ( ) => new PocoToTableEntityConverter < PocoWithNonStringRowKey > ( ) ) ;
47+
48+ Assert . AreEqual ( "If the RowKey property is present, it must be a String." , exception . Message ) ;
4849 }
4950
5051 [ Test ]
5152 public void Create_IfRowKeyHasIndexParameters_Throws ( )
5253 {
5354 // Act & Assert
54- ExceptionAssert . ThrowsInvalidOperation ( ( ) => new PocoToTableEntityConverter < PocoWithIndexerRowKey > ( ) ,
55- "If the RowKey property is present, it must not be an indexer." ) ;
55+ var exception = Assert . Throws < InvalidOperationException > ( ( ) => new PocoToTableEntityConverter < PocoWithIndexerRowKey > ( ) ) ;
56+
57+ Assert . AreEqual ( "If the RowKey property is present, it must not be an indexer." , exception . Message ) ;
5658 }
5759
5860 [ Test ]
5961 public void Create_IfTimestampIsNonDateTimeOffset_Throws ( )
6062 {
6163 // Act & Assert
62- ExceptionAssert . ThrowsInvalidOperation (
63- ( ) => new PocoToTableEntityConverter < PocoWithNonDateTimeOffsetTimestamp > ( ) ,
64- "If the Timestamp property is present, it must be a DateTimeOffset." ) ;
64+ var exception = Assert . Throws < InvalidOperationException > ( ( ) => new PocoToTableEntityConverter < PocoWithNonDateTimeOffsetTimestamp > ( ) ) ;
65+
66+ Assert . AreEqual ( "If the Timestamp property is present, it must be a DateTimeOffset." , exception . Message ) ;
6567 }
6668
6769 [ Test ]
6870 public void Create_IfTimestampHasIndexParameters_Throws ( )
6971 {
7072 // Act & Assert
71- ExceptionAssert . ThrowsInvalidOperation ( ( ) => new PocoToTableEntityConverter < PocoWithIndexerTimestamp > ( ) ,
72- "If the Timestamp property is present, it must not be an indexer." ) ;
73+ var exception = Assert . Throws < InvalidOperationException > ( ( ) => new PocoToTableEntityConverter < PocoWithIndexerTimestamp > ( ) ) ;
74+
75+ Assert . AreEqual ( "If the Timestamp property is present, it must not be an indexer." , exception . Message ) ;
7376 }
7477
7578 [ Test ]
7679 public void Create_IfETagIsNonString_Throws ( )
7780 {
7881 // Act & Assert
79- ExceptionAssert . ThrowsInvalidOperation ( ( ) => new PocoToTableEntityConverter < PocoWithNonStringETag > ( ) ,
80- "If the ETag property is present, it must be a String." ) ;
82+ var exception = Assert . Throws < InvalidOperationException > ( ( ) => new PocoToTableEntityConverter < PocoWithNonStringETag > ( ) ) ;
83+
84+ Assert . AreEqual ( "If the ETag property is present, it must be a String." , exception . Message ) ;
8185 }
8286
8387 [ Test ]
8488 public void Create_IfETagHasIndexParameters_Throws ( )
8589 {
8690 // Act & Assert
87- ExceptionAssert . ThrowsInvalidOperation ( ( ) => new PocoToTableEntityConverter < PocoWithIndexerETag > ( ) ,
88- "If the ETag property is present, it must not be an indexer." ) ;
91+ var exception = Assert . Throws < InvalidOperationException > ( ( ) => new PocoToTableEntityConverter < PocoWithIndexerETag > ( ) ) ;
92+
93+ Assert . AreEqual ( "If the ETag property is present, it must not be an indexer." , exception . Message ) ;
8994 }
9095
9196 [ Test ]
0 commit comments