Skip to content

Commit

Permalink
Appends 'Context' to the context stub classes
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosNihelton committed Sep 19, 2023
1 parent f8cf3c9 commit 7d39b45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions storeapi/test/ServerStoreServiceTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace StoreApi {
using namespace ::testing;

TEST(ServerStoreService, NoUsersLikeInCI) {
auto service = ServerStoreService<NoUsers>{};
auto service = ServerStoreService<NoUsersContext>{};
EXPECT_THROW({auto user = service.CurrentUserInfo();}, Exception);
}

Expand All @@ -20,7 +20,7 @@ TEST(ServerStoreService, TooManyUsers) {

TEST(ServerStoreService, FindOneUser) {
static constexpr char goodHash[] = "goodHash";
auto service = ServerStoreService<FindOneUser>{};
auto service = ServerStoreService<FindOneUserContext>{};
FindOneUser::goodHash = goodHash;
auto user = service.CurrentUserInfo();
EXPECT_EQ(user.id, goodHash);
Expand Down
4 changes: 2 additions & 2 deletions storeapi/test/stubs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,14 @@ struct TooManyUsersContext {
}
};

struct NoUsers {
struct NoUsersContext {
struct Product {};
std::vector<std::string> AllLocallyAuthenticatedUserHashes() const {
return {};
}
};

struct FindOneUser {
struct FindOneUserContext {
struct Product {};
static inline std::string goodHash{};
std::vector<std::string> AllLocallyAuthenticatedUserHashes() const {
Expand Down

0 comments on commit 7d39b45

Please sign in to comment.