lte/gateway/c/session_manager/test/test_session_state.cpp
// Test the case where the GSU is empty. (All credit has is_valid=false). We
// treat this as an invalid credit and reject it.
Test the case where the GSU is empty. (All credit has is_valid=false). We
treat this as an invalid credit and reject it.
Test the case where the GSU is empty . ( All credit has is_valid = false ) . We treat this as an invalid credit and reject it .
TEST_F(SessionStateTest, test_empty_gsu_credit_grant) {
  insert_rule(1, "m1", "rule1", STATIC, 0, 0);
  CreditUpdateResponse charge_resp;
  charge_resp.set_success(true);
  charge_resp.set_sid(IMSI1);
  charge_resp.set_charging_key(1);
  charge_resp.mutable_credit()->set_type(ChargingCredit::BYTES);
  EXPECT_FALSE(
      session_state->receive_charging_credit(charge_resp, &update_criteria));
  EXPECT_EQ(update_criteria.charging_credit_to_install.size(), 0);
}
TEST_F ( SessionStateTest , test_empty_gsu_credit_grant ) { insert_rule ( 1 , " " , " " , STATIC , 0 , 0 ) ; CreditUpdateResponse charge_resp ; charge_resp . set_success ( true ) ; charge_resp . set_sid ( IMSI1 ) ; charge_resp . set_charging_key ( 1 ) ; charge_resp . mutable_credit ( ) -> set_type ( ChargingCredit :: BYTES ) ; EXPECT_FALSE ( session_state -> receive_charging_credit ( charge_resp , & update_criteria ) ) ; EXPECT_EQ ( update_criteria . charging_credit_to_install . size ( ) , 0 ) ; }
Test the case where the GSU is empty.
Test the case where the GSU is empty .
// A ChargingCredit with no GSU but FinalAction // Should return false to indicate credit installation did not go through // Test that the update criteria is untouched