package be.bendem.sqlstreams;

import be.bendem.sqlstreams.impl.SqlBindings;
import org.junit.Assert;
import org.junit.Test;

import java.util.Optional;

public class EnumTests extends BaseTests {

    public enum SomeEnum {
        VALUE_1, VALUE_2
    }

    @Test
    public void insertEnum() {
        try (Update update = sql.update(INSERT_INTO_TEST).with(SomeEnum.VALUE_2)) {
            Assert.assertEquals(1, update.count());
        }
        Optional<SomeEnum> inserted = sql.first("select b from test", rs -> SqlBindings.map(rs, 1, SomeEnum.class));

        Assert.assertTrue(inserted.isPresent());
        Assert.assertEquals(SomeEnum.VALUE_2, inserted.get());
    }
}

@@ -28,54 +28,8 @@
 s;%0A%0A
-import be.bendem.sqlstreams.impl.SqlBindings;%0A
 impo
@@ -472,45 +472,38 @@
 -%3E S
-qlBindings.map(rs, 1, SomeEnum.class)
+omeEnum.values()%5Brs.getInt(1)%5D
 );%0A%0A

Remove usage of SqlBindings use in tests