mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-23 17:32:27 +00:00
Split normal tests from game api tests
This commit is contained in:
parent
68eb6aeb3e
commit
1fbabe0000
11 changed files with 74 additions and 14 deletions
43
ProjectLighthouse.Tests/SerializerTests.cs
Normal file
43
ProjectLighthouse.Tests/SerializerTests.cs
Normal file
|
@ -0,0 +1,43 @@
|
|||
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"))
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue