public void InvalidBehaviorCauseError(string value, BSharpPatchCreateBehavior patchtype) { var code = "patch for=x new='" + value + "'"; var result = Compile(code); Assert.AreEqual(1, result.MetaClasses.Count); Assert.AreEqual(patchtype, result.MetaClasses.Values.First().PatchCreateBehavior); if (patchtype == BSharpPatchCreateBehavior.Invalid) { Assert.AreEqual(1, result.Errors.Count); Assert.AreEqual(BSharpErrorType.PatchError, result.Errors[0].Type); } }
public void InvalidBehaviorCauseError(string value, BSharpPatchCreateBehavior patchtype) { var code = "patch for=x new='"+value+"'"; var result = Compile(code); Assert.AreEqual(1, result.MetaClasses.Count); Assert.AreEqual(patchtype, result.MetaClasses.Values.First().PatchCreateBehavior); if (patchtype == BSharpPatchCreateBehavior.Invalid){ Assert.AreEqual(1, result.Errors.Count); Assert.AreEqual(BSharpErrorType.PatchError, result.Errors[0].Type); } }