public void GetMetaForDll_FormatsDefineConstraintsProperly_WithoutConstraints() { var output = UnityMeta.GetMetaForDll(Guid.NewGuid(), true, Array.Empty <string>(), Array.Empty <string>()); StringAssert.DoesNotContain("defineConstraints", output); // This is on the same line in the template, so ensure it's intact StringAssert.Contains("\n isPreloaded: 0\n", output); }
public void GetMetaForDll_FormatsLabelsProperly_WithoutLabels() { var output = UnityMeta.GetMetaForDll(Guid.NewGuid(), true, Array.Empty <string>(), Array.Empty <string>()); StringAssert.DoesNotContain("labels", output); // This is on the same line in the template, so ensure it's intact StringAssert.Contains("\nPluginImporter:\n", output); }
public void GetMetaForDll_FormatsDefineConstraintsProperly_WithConstraints( string[] constraints, string expected) { var output = UnityMeta.GetMetaForDll(Guid.NewGuid(), true, Array.Empty <string>(), constraints); StringAssert.Contains(expected, output); // This is on the same line in the template, so ensure it's intact StringAssert.Contains("\n isPreloaded: 0\n", output); }
public void GetMetaForDll_ContainsNoWindowsNewlines() { var output = UnityMeta.GetMetaForDll(Guid.NewGuid(), true, Array.Empty <string>(), new[] { "TEST" }); StringAssert.DoesNotContain("\r", output); }
public void GetMetaForDll_FormatsAnyPlatformEnabledProperly(bool value, string expected) { var output = UnityMeta.GetMetaForDll(Guid.NewGuid(), value, Array.Empty <string>(), Array.Empty <string>()); StringAssert.Contains($"\n platformData:\n - first:\n Any:\n second:\n enabled: {expected}\n", output); }