Skip to content

Commit

Permalink
Updates to the base StoreService tests
Browse files Browse the repository at this point in the history
As before, just to preserve the previous behavior.
  • Loading branch information
CarlosNihelton committed Sep 15, 2023
1 parent fcd6fc2 commit af56690
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions storeapi/test/StoreServiceTest.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <gtest/gtest.h>

#include <base/Exception.hpp>
#include <base/StoreService.hpp>

#include "stubs.hpp"
Expand All @@ -15,7 +16,7 @@ class DoubledService : public StoreService<DoubledContext> {

TEST(StoreService, DoubledProductsThrow) {
DoubledService service{};
EXPECT_THROW({ service.GetSubscriptionProduct("never-mind").get(); },
EXPECT_THROW({ service.GetSubscriptionProduct("never-mind"); },
Exception);
}

Expand All @@ -25,7 +26,7 @@ class EmptyService : public StoreService<EmptyContext> {
};
TEST(StoreService, EmptyProductsThrow) {
DoubledService service{};
EXPECT_THROW({ service.GetSubscriptionProduct("never-mind").get(); },
EXPECT_THROW({ service.GetSubscriptionProduct("never-mind"); },
Exception);
}

Expand All @@ -35,9 +36,9 @@ class IdentityService : public StoreService<FirstContext> {
};
TEST(IdentityService, OneProductNoThrow) {
IdentityService service{};
auto product = service.GetSubscriptionProduct("never-mind").get();
EXPECT_EQ(product.kind, L"Durable");
EXPECT_EQ(product.id, L"never-mind");
auto product = service.GetSubscriptionProduct("never-mind");
EXPECT_EQ(product.kind, "Durable");
EXPECT_EQ(product.id, "never-mind");
}

} // namespace StoreApi

0 comments on commit af56690

Please sign in to comment.