Skip to content

Commit

Permalink
Update files with License
Browse files Browse the repository at this point in the history
  • Loading branch information
spirosoik committed Aug 5, 2016
1 parent 3eb7ce4 commit b950149
Show file tree
Hide file tree
Showing 16 changed files with 241 additions and 8 deletions.
4 changes: 1 addition & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ dependencies {
//butterknife
compile 'com.jakewharton:butterknife:8.2.1'
apt 'com.jakewharton:butterknife-compiler:8.2.1'

//recyclerview
compile 'com.android.support:recyclerview-v7:23.4.0'
compile project(':rxfirebase')

//rxfirebase
compile 'com.ezhome:rxfirebase:1.0.0'

testCompile 'junit:junit:4.12'
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2016 Ezhome Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ezhome.rxfirebase;

import com.firebase.client.DataSnapshot;
Expand Down
15 changes: 15 additions & 0 deletions rxfirebase/src/main/java/com/ezhome/rxfirebase/RxFirebase.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2016 Ezhome Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ezhome.rxfirebase;

import com.ezhome.rxfirebase.FirebaseChildEvent.EventType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2016 Ezhome Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ezhome.rxfirebase;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2016 Ezhome Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ezhome.rxfirebase.exception;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2016 Ezhome Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ezhome.rxfirebase.exception;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2016 Ezhome Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ezhome.rxfirebase.exception;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
/**
* Copyright 2016 Ezhome Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ezhome.rxfirebase.exception;

import com.ezhome.rxfirebase.RxFirebase;

/**
* Generic exception for {@link RxFirebase}
*/
public class FirebaseGeneralException extends Exception {

public FirebaseGeneralException() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2016 Ezhome Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ezhome.rxfirebase.exception;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2016 Ezhome Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ezhome.rxfirebase.exception;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2016 Ezhome Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ezhome.rxfirebase.exception;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2016 Ezhome Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ezhome.rxfirebase.exception;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2016 Ezhome Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ezhome.rxfirebase.exception;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2016 Ezhome Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ezhome.rxfirebase;

import android.app.Application;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2016 Ezhome Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ezhome.rxfirebase;

import android.os.Build;
Expand Down
30 changes: 25 additions & 5 deletions rxfirebase/src/test/java/com/ezhome/rxfirebase/RxFirebaseTest.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2016 Ezhome Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ezhome.rxfirebase;

import com.firebase.client.DataSnapshot;
Expand Down Expand Up @@ -69,7 +84,8 @@ public class RxFirebaseTest extends ApplicationTestCase {
}

@Test public void testObserveChildValue() {
when(spyRxFirebase.observeChildEvent(mockRef)).thenReturn(Observable.just(mockFirebaseChildEvent));
when(spyRxFirebase.observeChildEvent(mockRef)).thenReturn(
Observable.just(mockFirebaseChildEvent));

TestSubscriber<FirebaseChildEvent> testSubscriber = new TestSubscriber<>();
spyRxFirebase.observeChildEvent(mockRef)
Expand Down Expand Up @@ -100,7 +116,8 @@ public class RxFirebaseTest extends ApplicationTestCase {

@Test public void testObserveChildAdded() {
mockFirebaseChildEvent.setEventType(FirebaseChildEvent.EventType.ADDED);
when(spyRxFirebase.observeChildAdded(mockRef)).thenReturn(Observable.just(mockFirebaseChildEvent));
when(spyRxFirebase.observeChildAdded(mockRef)).thenReturn(
Observable.just(mockFirebaseChildEvent));

TestSubscriber<FirebaseChildEvent> testSubscriber = new TestSubscriber<>();
spyRxFirebase.observeChildAdded(mockRef)
Expand All @@ -116,7 +133,8 @@ public class RxFirebaseTest extends ApplicationTestCase {

@Test public void testObserveChildRemoved() {
mockFirebaseChildEvent.setEventType(FirebaseChildEvent.EventType.REMOVED);
when(spyRxFirebase.observeChildRemoved(mockRef)).thenReturn(Observable.just(mockFirebaseChildEvent));
when(spyRxFirebase.observeChildRemoved(mockRef)).thenReturn(
Observable.just(mockFirebaseChildEvent));

TestSubscriber<FirebaseChildEvent> testSubscriber = new TestSubscriber<>();
spyRxFirebase.observeChildRemoved(mockRef)
Expand All @@ -132,7 +150,8 @@ public class RxFirebaseTest extends ApplicationTestCase {

@Test public void testObserveChildChanged() {
mockFirebaseChildEvent.setEventType(FirebaseChildEvent.EventType.CHANGED);
when(spyRxFirebase.observeChildChanged(mockRef)).thenReturn(Observable.just(mockFirebaseChildEvent));
when(spyRxFirebase.observeChildChanged(mockRef)).thenReturn(
Observable.just(mockFirebaseChildEvent));

TestSubscriber<FirebaseChildEvent> testSubscriber = new TestSubscriber<>();
spyRxFirebase.observeChildChanged(mockRef)
Expand All @@ -148,7 +167,8 @@ public class RxFirebaseTest extends ApplicationTestCase {

@Test public void testObserveChildMoved() {
mockFirebaseChildEvent.setEventType(FirebaseChildEvent.EventType.MOVED);
when(spyRxFirebase.observeChildMoved(mockRef)).thenReturn(Observable.just(mockFirebaseChildEvent));
when(spyRxFirebase.observeChildMoved(mockRef)).thenReturn(
Observable.just(mockFirebaseChildEvent));

TestSubscriber<FirebaseChildEvent> testSubscriber = new TestSubscriber<>();
spyRxFirebase.observeChildMoved(mockRef)
Expand Down

0 comments on commit b950149

Please sign in to comment.