Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

78 menyxml should be the same when generated on linux and on windows #79

Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3dd4861
Changed document order for english Database/EN and Database/PO. And s…
JohannesFinsveen Mar 4, 2024
4a7dd50
Generated menu.xml , please pass tests
JohannesFinsveen Mar 4, 2024
287874f
Changed to shift-7 slashes and dateformat.ToString format
JohannesFinsveen Mar 4, 2024
9d7505b
Sorted menu xml
JohannesFinsveen Mar 5, 2024
1596403
Sorted menu xml with spaces not tabs
JohannesFinsveen Mar 5, 2024
e8bd7ba
Adding test that fails :-)
JohannesFinsveen Mar 6, 2024
285751f
Will this also pass on Linux ?
JohannesFinsveen Mar 6, 2024
cf8fff1
Will this also pass on Linux again?
JohannesFinsveen Mar 6, 2024
0e475dc
Added crude sorting on xml output
JohannesFinsveen Mar 6, 2024
8ed3a9d
Moved the work into a method, so that the "unittest" can await it.
JohannesFinsveen Mar 6, 2024
fbc6dc0
Added Test that creates Menu.xml and compares it to expectedMenu.xml
JohannesFinsveen Mar 6, 2024
420849c
Making sure the menu.xml was written to
JohannesFinsveen Mar 6, 2024
4dead76
Added error mess on test
JohannesFinsveen Mar 6, 2024
e4cea4c
test printing logged messages
JohannesFinsveen Mar 6, 2024
166be9e
changed \ to /
JohannesFinsveen Mar 6, 2024
fc9ded2
Removing size attribute before comparing
JohannesFinsveen Mar 6, 2024
7b21fd5
Add macos-latest
runejo Mar 7, 2024
3f2dd62
Hunting macos trailing space , which caused tests to fail ... take 1
JohannesFinsveen Mar 7, 2024
fdfbd34
Hunting macos trailing space , which caused tests to fail ... take 2
JohannesFinsveen Mar 7, 2024
b1580e5
Hunting macos trailing space. Order of alias-files ... take 3
JohannesFinsveen Mar 7, 2024
e4d4867
Removing the trailing space to see if macos has more surprises
JohannesFinsveen Mar 7, 2024
6b177e6
Made Other folder for tests that do not test the application itself
JohannesFinsveen Mar 7, 2024
4d23830
Does ubuntu have this order?
JohannesFinsveen Mar 7, 2024
81ded9a
Added AliasTxtFirstComparer
JohannesFinsveen Mar 7, 2024
17e028a
Removed a line of debug logging
JohannesFinsveen Mar 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adding test that fails :-)
JohannesFinsveen committed Mar 6, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit e8bd7ba8bd5cb1a1804ac8f9c445e560d98f8c85
48 changes: 48 additions & 0 deletions PxWebApi.BigTests/LabTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
using Microsoft.AspNetCore.Routing.Constraints;
using Microsoft.Extensions.Hosting.Internal;
using Microsoft.Extensions.Options;
using PxWeb.Code.BackgroundWorker;
using PxWeb.Controllers.Api2.Admin;
using System;
using System.Globalization;
using System.Threading;
using System.Threading.Tasks;

namespace PxWebApi.BigTests
{
[TestClass]
public class LabTest
{
[TestMethod]


// TODO set Thread.CurrentThread.CurrentCulture in all methods

public void Raw()
{
var raw = DateTime.Now.ToString();
Assert.AreEqual("raw,"+ CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern, raw);
}

[TestMethod]
public void withInvariantCulture()
{
// Clone the InvariantCulture
CultureInfo customCulture = (CultureInfo)CultureInfo.InvariantCulture.Clone();

// Set the desired date and time pattern
customCulture.DateTimeFormat.ShortDatePattern = "yyyy_MM_dd";
customCulture.DateTimeFormat.LongDatePattern = "yyyy_MM_dd";
customCulture.DateTimeFormat.ShortTimePattern = "HH:mm";
customCulture.DateTimeFormat.LongTimePattern = "HH:mm";

// Apply the custom culture to the current thread
Thread.CurrentThread.CurrentCulture = customCulture;
Thread.CurrentThread.CurrentUICulture = customCulture;

var withIC = DateTime.Now.ToString();
Assert.AreEqual("withIC ," + CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern, withIC);
}

}
}