forked from rpgmaker/NetJSON
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNetJSONCoreTest.cs
More file actions
27 lines (25 loc) · 644 Bytes
/
NetJSONCoreTest.cs
File metadata and controls
27 lines (25 loc) · 644 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Xunit;
namespace NetJSON.Core.Tests
{
public class TestClass
{
public int ID { get; set; }
public string Name { get; set; }
}
public class NetJSONCoreTest
{
[Fact]
public void CanSerializeTestData()
{
var data = new TestClass { ID = 1000, Name = "This is a test" };
var json = NetJSON.Serialize(data);
var data2 = NetJSON.Deserialize<TestClass>(json);
Assert.Equal(data.ID, data2.ID);
}
}
}