-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #298 from MartinM85/feature/280-datetime-invariant…
…-culture Use invariant culture for (de)serialization
- Loading branch information
Showing
24 changed files
with
2,065 additions
and
111 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using Xunit; | ||
|
||
namespace Microsoft.Kiota.Abstractions.Tests | ||
{ | ||
public class TimeTests | ||
{ | ||
[Fact] | ||
public void TestTimeEquality() | ||
{ | ||
var time1 = new Time(10, 30, 0); | ||
var time2 = new Time(new DateTime(2024, 7, 17, 10, 30, 0)); | ||
var time3 = new Time(12, 0, 0); | ||
|
||
Assert.Equal(time1, time2); | ||
Assert.NotEqual(time1, time3); | ||
} | ||
|
||
[Fact] | ||
public void TestTimeToString() | ||
{ | ||
var time = new Time(15, 45, 30); | ||
var expectedString = "15:45:30"; | ||
|
||
Assert.Equal(expectedString, time.ToString()); | ||
} | ||
} | ||
} |
Oops, something went wrong.