public void WriterTest() { var modinfo = new ModinfoData("Test") { Version = new Version(1, 1, 1, "BETA") }; var data = modinfo.ToJson(false); Assert.Contains(@"""version"": ""1.1.1-BETA""", data); Assert.DoesNotContain(@"""custom"":", data); }
public void WriterTestModRefRange() { var modinfo = new ModinfoData("Test") { Dependencies = new DependencyList(new List <IModReference> { new ModReference("123", ModType.Default, new Range("1.x")) }, DependencyResolveLayout.ResolveRecursive) }; var data = modinfo.ToJson(false); Assert.Contains(@"""version-range"": ""1.x""", data); }
public void WriterTestDependencyList() { var modinfo = new ModinfoData("Test") { Dependencies = new DependencyList(new List <IModReference> { new ModReference("123", ModType.Default) }, DependencyResolveLayout.FullResolved) }; var data = modinfo.ToJson(false); Assert.Contains(@"""FullResolved"",", data); }