This file contains hidden or 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
package net.lamtran.rxjava2.validation; | |
/** | |
* Created by lam on 9/25/16. | |
*/ | |
public enum FieldType { | |
USERNAME, PASSWORD, EMAIL, PHONE_NUMBER, CARD_NUMBER | |
} |
This file contains hidden or 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
package net.lamtran.rxjava2; | |
import org.junit.After; | |
import org.junit.Before; | |
import org.junit.Test; | |
import java.util.List; | |
import rx.observers.TestSubscriber; |
This file contains hidden or 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
package net.lamtran.rxjava2; | |
import org.junit.Test; | |
import static org.hamcrest.MatcherAssert.assertThat; | |
import static org.hamcrest.core.IsEqual.equalTo; | |
import static org.junit.Assert.assertNotNull; | |
/** | |
* Created by lam on 9/23/16. |
This file contains hidden or 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
package net.lamtran.rxjava2; | |
import org.junit.Before; | |
import org.junit.Test; | |
import java.util.List; | |
import java.util.concurrent.TimeUnit; | |
import rx.observers.TestSubscriber; | |
import rx.schedulers.TestScheduler; |
This file contains hidden or 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
// Gets a list of Types | |
export function index(req, res) { | |
Type.find({}) | |
.populate('products') | |
.exec((err, types) => { | |
if (err) handleErr(err, res); | |
async.forEach(types, function (type, done) { | |
Product.find({type: type._id}, '-type -market') | |
.exec(function (err, products) { |
NewerOlder