Massive organization of classes and namespaces

This commit is contained in:
jvyden 2022-05-15 16:45:00 -04:00
commit c345eeebb9
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
218 changed files with 468 additions and 342 deletions

View file

@ -0,0 +1,42 @@
using System.Collections.Generic;
using LBPUnion.ProjectLighthouse.Serialization;
using Xunit;
namespace LBPUnion.ProjectLighthouse.Tests;
public class SerializerTests
{
[Fact]
public void BlankElementWorks()
{
Assert.Equal("<test></test>", LbpSerializer.BlankElement("test"));
}
[Fact]
public void StringElementWorks()
{
Assert.Equal("<test>asd</test>", LbpSerializer.StringElement("test", "asd"));
Assert.Equal("<test>asd</test>", LbpSerializer.StringElement(new KeyValuePair<string, object>("test", "asd")));
}
[Fact]
public void TaggedStringElementWorks()
{
Assert.Equal("<test foo=\"bar\">asd</test>", LbpSerializer.TaggedStringElement("test", "asd", "foo", "bar"));
Assert.Equal
(
"<test foo=\"bar\">asd</test>",
LbpSerializer.TaggedStringElement(new KeyValuePair<string, object>("test", "asd"), new KeyValuePair<string, object>("foo", "bar"))
);
}
[Fact]
public void ElementsWorks()
{
Assert.Equal
(
"<test>asd</test><foo>bar</foo>",
LbpSerializer.Elements(new KeyValuePair<string, object>("test", "asd"), new KeyValuePair<string, object>("foo", "bar"))
);
}
}