// Path: moshas/src/main/java/net/unit8/moshas/context/Context.java
// public class Context extends AbstractContext {
// 
//     public Context() {
//         super();
//     }
// 
//     public Context(Map<String, Object> variables) {
//         super();
//         for (Map.Entry<String, Object> entry : variables.entrySet()) {
//             setVariable(entry.getKey(), entry.getValue());
//         }
//     }
// }


import net.unit8.moshas.context.Context;
import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
package net.unit8.moshas;



/**
 * @author kawasima
 */
public class AttributesTest {
    MoshasEngine moshas = new MoshasEngine();

    @Test
    public void removeAttribute() {
        moshas.describe("META-INF/templates/attributes.html", t -> {
            t.select("#container", (el, ctx) -> {
                el.removeAttr("id");
                el.attr("class", "container");
            });

            t.select(".column", (el, ctx) -> el.addClass("red"));
        });

// Path: moshas/src/main/java/net/unit8/moshas/context/Context.java
// public class Context extends AbstractContext {
// 
//     public Context() {
//         super();
//     }
// 
//     public Context(Map<String, Object> variables) {
//         super();
//         for (Map.Entry<String, Object> entry : variables.entrySet()) {
//             setVariable(entry.getKey(), entry.getValue());
//         }
//     }
// }


// Path: moshas/src/test/java/net/unit8/moshas/AttributesTest.java
import net.unit8.moshas.context.Context;
import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

package net.unit8.moshas;



/**
 * @author kawasima
 */
public class AttributesTest {
    MoshasEngine moshas = new MoshasEngine();

    @Test
    public void removeAttribute() {
        moshas.describe("META-INF/templates/attributes.html", t -> {
            t.select("#container", (el, ctx) -> {
                el.removeAttr("id");
                el.attr("class", "container");
            });

            t.select(".column", (el, ctx) -> el.addClass("red"));
        });

        Context ctx = new Context();