mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
* Add a native AOT project. * Fixes Text.Json to work with native AOT. * Fix silent errors on unit tests when testing the Red color which has a length of 3. * Allowing test custom configuration without the config.json file match the unit tests configurations. * Fix unit test if tested alone. * Add native project into solution. * Fix merge errors. * Setting ConfigurationManager.ThrowOnJsonErrors as true to throw any serialization issue when published file runs. * Remove unnecessary using's. * Added unit test to ensure all serialization is properly configured. * Fix warnings. * Remove ThrowOnJsonErrors. * Fix warnings. --------- Co-authored-by: Tig <tig@users.noreply.github.com>
This commit is contained in:
@@ -29,13 +29,18 @@ public class ThemeScopeTests
|
||||
{
|
||||
Reset ();
|
||||
Assert.NotEmpty (Themes);
|
||||
Assert.Equal (Alignment.End, Dialog.DefaultButtonAlignment);
|
||||
Alignment savedValue = Dialog.DefaultButtonAlignment;
|
||||
Alignment newValue = Alignment.Center != savedValue ? Alignment.Center : Alignment.Start;
|
||||
|
||||
Themes ["Default"] ["Dialog.DefaultButtonAlignment"].PropertyValue = Alignment.Center;
|
||||
Themes ["Default"] ["Dialog.DefaultButtonAlignment"].PropertyValue = newValue;
|
||||
|
||||
ThemeManager.Themes! [ThemeManager.SelectedTheme]!.Apply ();
|
||||
Assert.Equal (Alignment.Center, Dialog.DefaultButtonAlignment);
|
||||
Reset ();
|
||||
Assert.Equal (newValue, Dialog.DefaultButtonAlignment);
|
||||
|
||||
// Replace with the savedValue to avoid failures on other unit tests that rely on the default value
|
||||
Themes ["Default"] ["Dialog.DefaultButtonAlignment"].PropertyValue = savedValue;
|
||||
ThemeManager.Themes! [ThemeManager.SelectedTheme]!.Apply ();
|
||||
Assert.Equal (savedValue, Dialog.DefaultButtonAlignment);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user