public CloseReopenTransactionBuilder WithType(Type.Kind kind) { if (!(kind == Type.Kind.CloseAccount || kind == Type.Kind.ReopenAccount)) { throw new ArgumentException($"Only {Type.Kind.CloseAccount} or {Type.Kind.ReopenAccount} supported. Was {kind}"); } _type = new Type(kind); return(this); }
public void testGetAST(string code, CursorKind fstChildKind, string fstChildSpelling, Type.Kind fstChildTypeKind) { Cursor root = getWrapper(code).getRoot(); Assert.AreEqual(CursorKind.TranslationUnit, root.Kind); Assert.AreEqual(fstChildKind, root.Children[0].Kind); Assert.AreEqual(fstChildSpelling, root.Children[0].Spelling); Assert.AreEqual(fstChildTypeKind, root.Children[0].ResultType.TypeKind); }