Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GLPI
java-library-glpi
Commits
57244dd3
Unverified
Commit
57244dd3
authored
Oct 24, 2017
by
Rafa Hernandez
Browse files
test(initsession): config with enviroment vars
parent
83af4c57
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
57244dd3
...
...
@@ -36,4 +36,5 @@ node_modules/
.externalNativeBuild
GLPIProject.iml
app/
/gradle.properties
gradle.properties
\ No newline at end of file
glpi/src/androidTest/java/org/flyve/glpi/GLPITest.java
View file @
57244dd3
...
...
@@ -9,7 +9,7 @@ import org.junit.Assert;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
static
org
.
junit
.
Assert
.
*
;
import
static
org
.
junit
.
Assert
.
assertNotEquals
;
/**
* Instrumented test, which will execute on an Android device.
...
...
@@ -20,15 +20,14 @@ import static org.junit.Assert.*;
public
class
GLPITest
{
// Context of the app under test.
Context
appContext
=
InstrumentationRegistry
.
getTargetContext
();
String
sessionToken
=
""
;
@Test
public
void
initSessionTest
()
throws
Exception
{
GLPI
glpi
=
new
GLPI
(
appContext
,
"https://dev.flyve.org/glpi/apirest.php/"
);
glpi
.
initSessionByCredentials
(
"rafaelje@gmail.com"
,
"12345678"
,
new
GLPI
.
InitSessionCallback
()
{
GLPI
glpi
=
new
GLPI
(
appContext
,
BuildConfig
.
GLPI_URL
);
glpi
.
initSessionByCredentials
(
BuildConfig
.
GLPI_USER
,
BuildConfig
.
GLPI_PASSWORD
,
new
GLPI
.
InitSessionCallback
()
{
@Override
public
void
onResponse
(
InitSession
response
)
{
sessionToken
=
response
.
getSessionToken
();
String
sessionToken
=
response
.
getSessionToken
();
assertNotEquals
(
""
,
sessionToken
);
}
...
...
@@ -38,7 +37,4 @@ public class GLPITest {
}
});
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment