This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import spock.lang.Specification | |
class CodeConstraintVerificationSpec extends Specification { | |
def repository = Mock(List) | |
def service = new Service(repository) | |
def "failing test"() { | |
given: | |
def entity = new Entity(events: ['test']) | |
when: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function batchInsert($table, $columns, $rows) | |
{ | |
$quotedTable = $this->db->quoteSql($table); | |
$quotedColumns = []; | |
foreach ($columns as $column) { | |
$quotedColumns[] = $this->db->quoteSql($column); | |
} | |
$sql = $this->db->getQueryBuilder()->batchInsert($quotedTable, $quotedColumns, $rows); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MapWithNonStringKeyAndReferenceValueTest extends ProxyTestBase { | |
@Test | |
public void testMapKeyShouldBeInteger() throws Exception { | |
morphia.map(ChildEntity.class, ParentEntity.class); | |
ChildEntity ce1 = new ChildEntity(); | |
ce1.value = "first"; | |
ChildEntity ce2 = new ChildEntity(); | |
ce2.value = "second"; |