src/modular/lib/modular_config/modular_config_unittest.cc
// Tests that ParseConfig successfully parses a valid Modular config JSON string with
// some non-default values set.
Tests that ParseConfig successfully parses a valid Modular config JSON string with
some non-default values set.
Tests that ParseConfig successfully parses a valid Modular config JSON string with some non - default values set .
TEST_F(ModularConfigReaderTest, ParseConfigOk) {
  static constexpr auto kConfigJson = R"({
    "basemgr": {
      "enable_cobalt": false
    },
    "sessionmgr": {
      "enable_cobalt": false
    }
  })";
  auto config_result = modular::ParseConfig(kConfigJson);
  ASSERT_TRUE(config_result.is_ok());
  auto config = config_result.take_value();
  ASSERT_TRUE(config.has_basemgr_config());
  EXPECT_FALSE(config.basemgr_config().enable_cobalt());
  ASSERT_TRUE(config.has_sessionmgr_config());
  EXPECT_FALSE(config.sessionmgr_config().enable_cobalt());
}
TEST_F ( ModularConfigReaderTest , ParseConfigOk ) { static constexpr auto kConfigJson = R" ( {
    "basemgr": {
      "enable_cobalt": false
    },
    "sessionmgr": {
      "enable_cobalt": false
    }
  } ) " ; auto config_result = modular :: ParseConfig ( kConfigJson ) ; ASSERT_TRUE ( config_result . is_ok ( ) ) ; auto config = config_result . take_value ( ) ; ASSERT_TRUE ( config . has_basemgr_config ( ) ) ; EXPECT_FALSE ( config . basemgr_config ( ) . enable_cobalt ( ) ) ; ASSERT_TRUE ( config . has_sessionmgr_config ( ) ) ; EXPECT_FALSE ( config . sessionmgr_config ( ) . enable_cobalt ( ) ) ; }
Tests that ParseConfig successfully parses a valid Modular config JSON string with
some non-default values set.
Tests that ParseConfig successfully parses a valid Modular config JSON string with some non - default values set .