committed by
GitHub
parent
e5400faad8
commit
f753a86e84
@@ -3,7 +3,7 @@ package com.baeldung.rxjava;
|
||||
import org.junit.Test;
|
||||
import rx.Observable;
|
||||
|
||||
import static com.baelding.rxjava.ObservableImpl.getTitle;
|
||||
import static com.baeldung.rxjava.ObservableImpl.getTitle;
|
||||
import static junit.framework.Assert.assertTrue;
|
||||
|
||||
public class ObservableTest {
|
||||
|
||||
@@ -10,8 +10,8 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static com.baelding.rxjava.operator.ToCleanString.toCleanString;
|
||||
import static com.baelding.rxjava.operator.ToLength.toLength;
|
||||
import static com.baeldung.rxjava.operator.ToCleanString.toCleanString;
|
||||
import static com.baeldung.rxjava.operator.ToLength.toLength;
|
||||
import static org.hamcrest.Matchers.hasItems;
|
||||
import static org.hamcrest.Matchers.hasSize;
|
||||
import static org.hamcrest.Matchers.notNullValue;
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import static org.hamcrest.Matchers.hasItems;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class SchedulersTest {
|
||||
public class SchedulersLiveTest {
|
||||
private String result = "";
|
||||
private String result1 = "";
|
||||
private String result2 = "";
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.baeldung.rxjava;
|
||||
|
||||
import com.baelding.rxjava.SubjectImpl;
|
||||
import org.junit.Test;
|
||||
import rx.subjects.PublishSubject;
|
||||
|
||||
|
||||
@@ -18,25 +18,25 @@ public class BasicQueryTypesIntegrationTest {
|
||||
private ConnectionProvider connectionProvider = Connector.connectionProvider;
|
||||
private Database db = Database.from(connectionProvider);
|
||||
|
||||
private Observable<Integer> create, insert1, insert2, insert3, update, delete = null;
|
||||
private Observable<Integer> create;
|
||||
|
||||
@Test
|
||||
public void whenCreateTableAndInsertRecords_thenCorrect() {
|
||||
create = db.update("CREATE TABLE IF NOT EXISTS EMPLOYEE(id int primary key, name varchar(255))")
|
||||
.count();
|
||||
insert1 = db.update("INSERT INTO EMPLOYEE(id, name) VALUES(1, 'John')")
|
||||
Observable<Integer> insert1 = db.update("INSERT INTO EMPLOYEE(id, name) VALUES(1, 'John')")
|
||||
.dependsOn(create)
|
||||
.count();
|
||||
update = db.update("UPDATE EMPLOYEE SET name = 'Alan' WHERE id = 1")
|
||||
Observable<Integer> update = db.update("UPDATE EMPLOYEE SET name = 'Alan' WHERE id = 1")
|
||||
.dependsOn(create)
|
||||
.count();
|
||||
insert2 = db.update("INSERT INTO EMPLOYEE(id, name) VALUES(2, 'Sarah')")
|
||||
Observable<Integer> insert2 = db.update("INSERT INTO EMPLOYEE(id, name) VALUES(2, 'Sarah')")
|
||||
.dependsOn(create)
|
||||
.count();
|
||||
insert3 = db.update("INSERT INTO EMPLOYEE(id, name) VALUES(3, 'Mike')")
|
||||
Observable<Integer> insert3 = db.update("INSERT INTO EMPLOYEE(id, name) VALUES(3, 'Mike')")
|
||||
.dependsOn(create)
|
||||
.count();
|
||||
delete = db.update("DELETE FROM EMPLOYEE WHERE id = 2")
|
||||
Observable<Integer> delete = db.update("DELETE FROM EMPLOYEE WHERE id = 2")
|
||||
.dependsOn(create)
|
||||
.count();
|
||||
List<String> names = db.select("select name from EMPLOYEE where id < ?")
|
||||
|
||||
Reference in New Issue
Block a user