-
-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Add date kind and offset options (#683)"
This reverts commit ac5e7e4.
- Loading branch information
1 parent
ac5e7e4
commit 80c5248
Showing
33 changed files
with
60 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
1 change: 0 additions & 1 deletion
1
src/Verify.Tests/DateFormatterTests.DateTimeLocalToJsonString_kind=True.verified.txt
This file was deleted.
Oops, something went wrong.
File renamed without changes.
1 change: 0 additions & 1 deletion
1
src/Verify.Tests/DateFormatterTests.DateTimeLocalToParameterString_kind=True.verified.txt
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion
1
src/Verify.Tests/DateFormatterTests.DateTimeOffsetUtcToJsonString_offset=True.verified.txt
This file was deleted.
Oops, something went wrong.
File renamed without changes.
1 change: 0 additions & 1 deletion
1
...rify.Tests/DateFormatterTests.DateTimeOffsetUtcToParameterString_offset=True.verified.txt
This file was deleted.
Oops, something went wrong.
File renamed without changes.
1 change: 0 additions & 1 deletion
1
...erify.Tests/DateFormatterTests.DateTimeOtherTimeZoneToJsonString_offset=True.verified.txt
This file was deleted.
Oops, something went wrong.
File renamed without changes.
1 change: 0 additions & 1 deletion
1
....Tests/DateFormatterTests.DateTimeOtherTimeZoneToParameterString_offset=True.verified.txt
This file was deleted.
Oops, something went wrong.
File renamed without changes.
1 change: 0 additions & 1 deletion
1
src/Verify.Tests/DateFormatterTests.DateTimeUnspecifiedToJsonString_kind=True.verified.txt
This file was deleted.
Oops, something went wrong.
File renamed without changes.
1 change: 0 additions & 1 deletion
1
...rify.Tests/DateFormatterTests.DateTimeUnspecifiedToParameterString_kind=True.verified.txt
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
src/Verify.Tests/DateFormatterTests.DateTimeUtcToJsonString.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2000-10-01 |
1 change: 0 additions & 1 deletion
1
src/Verify.Tests/DateFormatterTests.DateTimeUtcToJsonString_kind=True.verified.txt
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
src/Verify.Tests/DateFormatterTests.DateTimeUtcToParameterString.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2000-10-01 |
1 change: 0 additions & 1 deletion
1
src/Verify.Tests/DateFormatterTests.DateTimeUtcToParameterString_kind=True.verified.txt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,103 +1,87 @@ | ||
[UsesVerify] | ||
public class DateFormatterTests | ||
{ | ||
[Theory] | ||
[InlineData(true)] | ||
[InlineData(false)] | ||
public Task DateTimeOtherTimeZoneToJsonString(bool offset) | ||
[Fact] | ||
public Task DateTimeOtherTimeZoneToJsonString() | ||
{ | ||
var date = new DateTimeOffset(2000, 10, 1, 0, 0, 0, TimeSpan.FromHours(1.5)); | ||
return Verify(DateFormatter.ToJsonString(date, offset)) | ||
.UseParameters( offset); | ||
return Verify(DateFormatter.ToJsonString(date)); | ||
} | ||
|
||
[Theory] | ||
[InlineData( true)] | ||
[InlineData( false)] | ||
public Task DateTimeOtherTimeZoneToParameterString(bool offset) | ||
[Fact] | ||
public Task DateTimeOtherTimeZoneToParameterString() | ||
{ | ||
var date = new DateTimeOffset(2000, 10, 1, 0, 0, 0, TimeSpan.FromHours(1.5)); | ||
return Verify(DateFormatter.ToParameterString(date, offset)) | ||
.UseParameters(offset); | ||
return Verify(DateFormatter.ToParameterString(date)); | ||
} | ||
|
||
[Theory] | ||
[InlineData(true)] | ||
[InlineData(false)] | ||
public Task DateTimeLocalToJsonString(bool kind) | ||
[Fact] | ||
public Task DateTimeLocalToJsonString() | ||
{ | ||
var date = new DateTime(2000, 10, 1, 0, 0, 0, DateTimeKind.Local); | ||
return Verify(DateFormatter.ToJsonString(date, kind)) | ||
.UseParameters(kind); | ||
return Verify(DateFormatter.ToJsonString(date)); | ||
} | ||
|
||
[Theory] | ||
[InlineData(true)] | ||
[InlineData(false)] | ||
public Task DateTimeLocalToParameterString(bool kind) | ||
[Fact] | ||
public Task DateTimeLocalToParameterString() | ||
{ | ||
var date = new DateTime(2000, 10, 1, 0, 0, 0, DateTimeKind.Local); | ||
return Verify(DateFormatter.ToParameterString(date, kind)) | ||
.UseParameters(kind); | ||
return Verify(DateFormatter.ToParameterString(date)); | ||
} | ||
|
||
[Theory] | ||
[InlineData(true)] | ||
[InlineData(false)] | ||
public Task DateTimeUnspecifiedToJsonString(bool kind) | ||
[Fact] | ||
public Task DateTimeOffsetLocalToJsonString() | ||
{ | ||
var date = new DateTimeOffset(2000, 10, 1, 0, 0, 0, DateTimeOffset.Now.Offset); | ||
return Verify(DateFormatter.ToJsonString(date)); | ||
} | ||
|
||
[Fact] | ||
public Task DateTimeOffsetLocalToParameterString() | ||
{ | ||
var date = new DateTimeOffset(2000, 10, 1, 0, 0, 0, DateTimeOffset.Now.Offset); | ||
return Verify(DateFormatter.ToParameterString(date)); | ||
} | ||
|
||
[Fact] | ||
public Task DateTimeUnspecifiedToJsonString() | ||
{ | ||
var date = new DateTime(2000, 10, 1, 0, 0, 0); | ||
return Verify(DateFormatter.ToJsonString(date, kind)) | ||
.UseParameters(kind); | ||
return Verify(DateFormatter.ToJsonString(date)); | ||
} | ||
|
||
[Theory] | ||
[InlineData(true)] | ||
[InlineData(false)] | ||
public Task DateTimeUnspecifiedToParameterString(bool kind) | ||
[Fact] | ||
public Task DateTimeUnspecifiedToParameterString() | ||
{ | ||
var date = new DateTime(2000, 10, 1, 0, 0, 0, DateTimeKind.Unspecified); | ||
return Verify(DateFormatter.ToParameterString(date, kind)) | ||
.UseParameters(kind); | ||
var date = new DateTime(2000, 10, 1, 0, 0, 0); | ||
return Verify(DateFormatter.ToParameterString(date)); | ||
} | ||
|
||
[Theory] | ||
[InlineData(true)] | ||
[InlineData(false)] | ||
public Task DateTimeUtcToJsonString(bool kind) | ||
[Fact] | ||
public Task DateTimeUtcToJsonString() | ||
{ | ||
var date = new DateTime(2000, 10, 1, 0, 0, 0, DateTimeKind.Utc); | ||
return Verify(DateFormatter.ToJsonString(date, kind)) | ||
.UseParameters(kind); | ||
return Verify(DateFormatter.ToJsonString(date)); | ||
} | ||
|
||
[Theory] | ||
[InlineData(true)] | ||
[InlineData(false)] | ||
public Task DateTimeUtcToParameterString(bool kind) | ||
[Fact] | ||
public Task DateTimeUtcToParameterString() | ||
{ | ||
var date = new DateTime(2000, 10, 1, 0, 0, 0, DateTimeKind.Utc); | ||
return Verify(DateFormatter.ToParameterString(date, kind)) | ||
.UseParameters(kind); | ||
return Verify(DateFormatter.ToParameterString(date)); | ||
} | ||
|
||
[Theory] | ||
[InlineData(true)] | ||
[InlineData(false)] | ||
public Task DateTimeOffsetUtcToJsonString(bool offset) | ||
[Fact] | ||
public Task DateTimeOffsetUtcToJsonString() | ||
{ | ||
var date = new DateTimeOffset(2000, 10, 1, 0, 0, 0, TimeSpan.Zero); | ||
return Verify(DateFormatter.ToJsonString(date, offset)) | ||
.UseParameters(offset); | ||
return Verify(DateFormatter.ToJsonString(date)); | ||
} | ||
|
||
[Theory] | ||
[InlineData(true)] | ||
[InlineData(false)] | ||
public Task DateTimeOffsetUtcToParameterString(bool offset) | ||
[Fact] | ||
public Task DateTimeOffsetUtcToParameterString() | ||
{ | ||
var date = new DateTimeOffset(2000, 10, 1, 0, 0, 0, TimeSpan.Zero); | ||
return Verify(DateFormatter.ToParameterString(date, offset)) | ||
.UseParameters(offset); | ||
return Verify(DateFormatter.ToParameterString(date)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.