Skip to content

Commit eeef18c

Browse files
committed
indev_get_compiling
1 parent 50651de commit eeef18c

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

sheets/test/application_flow.e

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ feature {NONE} -- Initialization
2323
get_token
2424
if last_token.token.is_empty then
2525
logger.write_warning ("retrieve_access_token-> There is something wrong token is empty")
26+
check
27+
not_happening: False
28+
end
2629
else
2730
logger.write_debug ("retrieve_access_token-> Let's play with the API, token seems ok:" + last_token.token)
2831
end
@@ -186,6 +189,14 @@ feature -- Status Setting
186189
end
187190
end
188191

192+
feature -- Status report
193+
194+
token_is_valid: BOOLEAN
195+
-- @JV: is that enough? is there a last_token.valid function?
196+
do
197+
Result := not last_token.token.is_empty
198+
end
199+
189200
feature -- Serialize Access Token
190201

191202
serialize (a_object: ANY): STRING

sheets/test/test_sheets_api.e

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,19 @@ feature -- {NONE}
1717

1818
make
1919
do
20+
logger.write_information ("make-> ======================> Starting application")
2021
set_from_json_credentials_file_path (create {PATH}.make_from_string ("/home/pg/tmp/eg-sheets/eg-sheets_credentials_eg-suite-desktop-api.json"))
2122
retrieve_access_token
2223
test_create_sheet
23-
-- test_get_sheet ("1v1N4nRa6mmLcP9rUuyQPiCnLuUcBQFDEC7E0CDg3ASI")
24+
test_get_sheet ("1v1N4nRa6mmLcP9rUuyQPiCnLuUcBQFDEC7E0CDg3ASI")
2425
end
2526

2627

2728
feature -- Tests
2829

2930
test_create_sheet
31+
require
32+
token_is_valid
3033
local
3134
l_esapi: EG_SHEETS_API
3235
do
@@ -35,7 +38,7 @@ feature -- Tests
3538
if attached l_esapi.create_spreedsheet as l_spreedsheet then
3639
if l_esapi.has_error then
3740
-- debug ("test_create_sheet")
38-
print ("test_create_sheet-> Error %N" )
41+
logger.write_error ("test_create_sheet-> Error" )
3942
print ("test_create_sheet-> Error: msg:" + l_esapi.error_message + "%N")
4043
print ("test_create_sheet-> See codes here: https://developers.google.com/maps-booking/reference/rest-api-v3/status_codes")
4144
print ("%N")

sheets/test/token.access

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)