mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
* fixed * Moved Glyphs to ThemeScope * Removed test code
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
|
||||
public class GlyphTests
|
||||
{
|
||||
[Fact]
|
||||
public void Default_GlyphDefinitions_Deserialize ()
|
||||
{
|
||||
var defs = new GlyphDefinitions ();
|
||||
|
||||
// enumerate all properties in GlyphDefinitions
|
||||
foreach (PropertyInfo prop in typeof (GlyphDefinitions).GetProperties ())
|
||||
{
|
||||
if (prop.PropertyType == typeof (Rune))
|
||||
{
|
||||
// Act
|
||||
var rune = (Rune)prop.GetValue (defs);
|
||||
string json = JsonSerializer.Serialize (rune, ConfigurationManager._serializerOptions);
|
||||
var deserialized = JsonSerializer.Deserialize<Rune> (json, ConfigurationManager._serializerOptions);
|
||||
|
||||
// Assert
|
||||
Assert.Equal (((Rune)prop.GetValue (defs)).Value, deserialized.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user