File tree Expand file tree Collapse file tree 17 files changed +123
-184
lines changed
core/test/firebase/firestore Expand file tree Collapse file tree 17 files changed +123
-184
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ if(APPLE)
29
29
FirebaseFirestore
30
30
firebase_firestore_local_testing
31
31
firebase_firestore_objc_test_util
32
- firebase_firestore_remote_test_util
32
+ firebase_firestore_remote_testing
33
33
# Force this to run in the project-wide binary directory so that relative
34
34
# paths used during compilation are usable.
35
35
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
Original file line number Diff line number Diff line change 35
35
#include " Firestore/core/src/firebase/firestore/util/async_queue.h"
36
36
#include " Firestore/core/src/firebase/firestore/util/log.h"
37
37
#include " Firestore/core/src/firebase/firestore/util/string_apple.h"
38
- #include " Firestore/core/test/firebase/firestore/util /create_noop_connectivity_monitor.h"
38
+ #include " Firestore/core/test/firebase/firestore/remote /create_noop_connectivity_monitor.h"
39
39
#include " absl/memory/memory.h"
40
40
#include " grpcpp/completion_queue.h"
41
41
51
51
using firebase::firestore::model::SnapshotVersion;
52
52
using firebase::firestore::model::TargetId;
53
53
using firebase::firestore::remote::ConnectivityMonitor;
54
+ using firebase::firestore::remote::CreateNoOpConnectivityMonitor;
54
55
using firebase::firestore::remote::GrpcConnection;
55
56
using firebase::firestore::remote::WatchChange;
56
57
using firebase::firestore::remote::WatchStream;
57
58
using firebase::firestore::remote::WatchTargetChange;
58
59
using firebase::firestore::remote::WriteStream;
59
60
using firebase::firestore::util::AsyncQueue;
60
- using firebase::firestore::util::CreateNoOpConnectivityMonitor;
61
61
using firebase::firestore::util::Status;
62
62
63
63
namespace firebase {
Original file line number Diff line number Diff line change 15
15
firebase_ios_cc_library (
16
16
firebase_firestore_remote_testing
17
17
SOURCES
18
+ create_noop_connectivity_monitor.cc
19
+ create_noop_connectivity_monitor.h
18
20
fake_target_metadata_provider.cc
19
21
fake_target_metadata_provider.h
20
22
DEPENDS
23
+ absl_memory
21
24
firebase_firestore_remote
22
25
)
23
26
@@ -26,8 +29,12 @@ firebase_ios_cc_test(
26
29
SOURCES
27
30
datastore_test.cc
28
31
exponential_backoff_test.cc
32
+ fake_credentials_provider.cc
33
+ fake_credentials_provider.h
29
34
grpc_connection_test.cc
30
35
grpc_stream_test.cc
36
+ grpc_stream_tester.cc
37
+ grpc_stream_tester.h
31
38
grpc_streaming_reader_test.cc
32
39
grpc_unary_call_test.cc
33
40
remote_event_test.cc
@@ -42,7 +49,6 @@ firebase_ios_cc_test(
42
49
firebase_firestore_local
43
50
firebase_firestore_remote
44
51
firebase_firestore_remote_testing
45
- firebase_firestore_remote_test_util
46
52
firebase_firestore_testutil
47
53
firebase_firestore_util_async_std
48
54
GMock::GMock
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2018 Google
2
+ * Copyright 2018 Google LLC
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
14
14
* limitations under the License.
15
15
*/
16
16
17
- #include " Firestore/core/test/firebase/firestore/util /create_noop_connectivity_monitor.h"
17
+ #include " Firestore/core/test/firebase/firestore/remote /create_noop_connectivity_monitor.h"
18
18
19
19
#include " absl/memory/memory.h"
20
20
21
21
namespace firebase {
22
22
namespace firestore {
23
- namespace util {
23
+ namespace remote {
24
24
25
- std::unique_ptr<remote:: ConnectivityMonitor> CreateNoOpConnectivityMonitor () {
25
+ std::unique_ptr<ConnectivityMonitor> CreateNoOpConnectivityMonitor () {
26
26
// The default implementation does nothing
27
- return absl::make_unique<remote:: ConnectivityMonitor>(nullptr );
27
+ return absl::make_unique<ConnectivityMonitor>(nullptr );
28
28
}
29
29
30
- } // namespace util
30
+ } // namespace remote
31
31
} // namespace firestore
32
32
} // namespace firebase
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2018 Google
2
+ * Copyright 2018 Google LLC
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
14
14
* limitations under the License.
15
15
*/
16
16
17
- #ifndef FIRESTORE_CORE_TEST_FIREBASE_FIRESTORE_UTIL_CREATE_NOOP_CONNECTIVITY_MONITOR_H_
18
- #define FIRESTORE_CORE_TEST_FIREBASE_FIRESTORE_UTIL_CREATE_NOOP_CONNECTIVITY_MONITOR_H_
17
+ #ifndef FIRESTORE_CORE_TEST_FIREBASE_FIRESTORE_REMOTE_CREATE_NOOP_CONNECTIVITY_MONITOR_H_
18
+ #define FIRESTORE_CORE_TEST_FIREBASE_FIRESTORE_REMOTE_CREATE_NOOP_CONNECTIVITY_MONITOR_H_
19
19
20
20
#include < memory>
21
21
22
22
#include " Firestore/core/src/firebase/firestore/remote/connectivity_monitor.h"
23
23
24
24
namespace firebase {
25
25
namespace firestore {
26
- namespace util {
26
+ namespace remote {
27
27
28
- std::unique_ptr<remote:: ConnectivityMonitor> CreateNoOpConnectivityMonitor ();
28
+ std::unique_ptr<ConnectivityMonitor> CreateNoOpConnectivityMonitor ();
29
29
30
- } // namespace util
30
+ } // namespace remote
31
31
} // namespace firestore
32
32
} // namespace firebase
33
33
34
- #endif // FIRESTORE_CORE_TEST_FIREBASE_FIRESTORE_UTIL_CREATE_NOOP_CONNECTIVITY_MONITOR_H_
34
+ #endif // FIRESTORE_CORE_TEST_FIREBASE_FIRESTORE_REMOTE_CREATE_NOOP_CONNECTIVITY_MONITOR_H_
Original file line number Diff line number Diff line change 32
32
#include " Firestore/core/src/firebase/firestore/util/status.h"
33
33
#include " Firestore/core/src/firebase/firestore/util/statusor.h"
34
34
#include " Firestore/core/src/firebase/firestore/util/string_apple.h"
35
+ #include " Firestore/core/test/firebase/firestore/remote/fake_credentials_provider.h"
36
+ #include " Firestore/core/test/firebase/firestore/remote/grpc_stream_tester.h"
35
37
#include " Firestore/core/test/firebase/firestore/testutil/async_testing.h"
36
38
#include " Firestore/core/test/firebase/firestore/testutil/testutil.h"
37
- #include " Firestore/core/test/firebase/firestore/util/fake_credentials_provider.h"
38
- #include " Firestore/core/test/firebase/firestore/util/grpc_stream_tester.h"
39
39
#include " absl/memory/memory.h"
40
40
#include " absl/strings/str_cat.h"
41
41
#include " gmock/gmock.h"
@@ -57,12 +57,7 @@ using nanopb::Message;
57
57
using testing::Not;
58
58
using testutil::Value;
59
59
using util::AsyncQueue;
60
- using util::CompletionEndState;
61
- using util::CompletionResult;
62
60
using util::Executor;
63
- using util::FakeCredentialsProvider;
64
- using util::FakeGrpcQueue;
65
- using util::GrpcStreamTester;
66
61
using util::Status;
67
62
using util::StatusOr;
68
63
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2018 Google
2
+ * Copyright 2018 Google LLC
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
14
14
* limitations under the License.
15
15
*/
16
16
17
- #include " Firestore/core/test/firebase/firestore/util /fake_credentials_provider.h"
17
+ #include " Firestore/core/test/firebase/firestore/remote /fake_credentials_provider.h"
18
18
19
19
#include < utility>
20
20
24
24
25
25
namespace firebase {
26
26
namespace firestore {
27
- namespace util {
27
+ namespace remote {
28
28
29
29
using auth::EmptyCredentialsProvider;
30
30
using auth::TokenListener;
@@ -65,6 +65,6 @@ void FakeCredentialsProvider::FailGetToken() {
65
65
fail_get_token_ = true ;
66
66
}
67
67
68
- } // namespace util
68
+ } // namespace remote
69
69
} // namespace firestore
70
70
} // namespace firebase
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2018 Google
2
+ * Copyright 2018 Google LLC
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
14
14
* limitations under the License.
15
15
*/
16
16
17
- #ifndef FIRESTORE_CORE_TEST_FIREBASE_FIRESTORE_UTIL_FAKE_CREDENTIALS_PROVIDER_H_
18
- #define FIRESTORE_CORE_TEST_FIREBASE_FIRESTORE_UTIL_FAKE_CREDENTIALS_PROVIDER_H_
17
+ #ifndef FIRESTORE_CORE_TEST_FIREBASE_FIRESTORE_REMOTE_FAKE_CREDENTIALS_PROVIDER_H_
18
+ #define FIRESTORE_CORE_TEST_FIREBASE_FIRESTORE_REMOTE_FAKE_CREDENTIALS_PROVIDER_H_
19
19
20
20
#include < string>
21
21
#include < vector>
24
24
25
25
namespace firebase {
26
26
namespace firestore {
27
- namespace util {
27
+ namespace remote {
28
28
29
29
class FakeCredentialsProvider : public auth ::EmptyCredentialsProvider {
30
30
public:
@@ -50,8 +50,8 @@ class FakeCredentialsProvider : public auth::EmptyCredentialsProvider {
50
50
auth::TokenListener delayed_token_listener_;
51
51
};
52
52
53
- } // namespace util
53
+ } // namespace remote
54
54
} // namespace firestore
55
55
} // namespace firebase
56
56
57
- #endif // FIRESTORE_CORE_TEST_FIREBASE_FIRESTORE_UTIL_FAKE_CREDENTIALS_PROVIDER_H_
57
+ #endif // FIRESTORE_CORE_TEST_FIREBASE_FIRESTORE_REMOTE_FAKE_CREDENTIALS_PROVIDER_H_
Original file line number Diff line number Diff line change 26
26
#include " Firestore/core/src/firebase/firestore/util/async_queue.h"
27
27
#include " Firestore/core/src/firebase/firestore/util/status.h"
28
28
#include " Firestore/core/src/firebase/firestore/util/statusor.h"
29
+ #include " Firestore/core/test/firebase/firestore/remote/grpc_stream_tester.h"
29
30
#include " Firestore/core/test/firebase/firestore/testutil/async_testing.h"
30
- #include " Firestore/core/test/firebase/firestore/util/grpc_stream_tester.h"
31
31
#include " absl/memory/memory.h"
32
32
#include " gtest/gtest.h"
33
33
@@ -39,7 +39,6 @@ using auth::Token;
39
39
using auth::User;
40
40
using core::DatabaseInfo;
41
41
using util::AsyncQueue;
42
- using util::GrpcStreamTester;
43
42
using util::Status;
44
43
using util::StatusOr;
45
44
You can’t perform that action at this time.
0 commit comments