File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
UnitTests/UnitTests.UWP/Helpers Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -73,10 +73,22 @@ public void Test_StorageHelper_LegacyDateTestFailure()
73
73
/// </summary>
74
74
[ TestCategory ( "Helpers" ) ]
75
75
[ TestMethod ]
76
- [ ExpectedException ( typeof ( ArgumentException ) ) ]
77
76
public void Test_StorageHelper_DateTestFailure ( )
78
77
{
79
- _localStorageHelperSystem . Save ( "Today" , DateTime . Today ) ;
78
+ Exception expectedException = null ;
79
+
80
+ // We can't use standard exception checking here like Assert.Throws or ExpectedException
81
+ // as local and online platforms seem to throw different exception types :(
82
+ try
83
+ {
84
+ _localStorageHelperSystem . Save ( "Today" , DateTime . Today ) ;
85
+ }
86
+ catch ( Exception exception )
87
+ {
88
+ expectedException = exception ;
89
+ }
90
+
91
+ Assert . IsNotNull ( expectedException , "Was expecting an Exception." ) ;
80
92
}
81
93
82
94
[ TestCategory ( "Helpers" ) ]
You can’t perform that action at this time.
0 commit comments