Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
javaazureappconfig
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jalaluddin Shaikh
javaazureappconfig
Commits
423fc2a9
Commit
423fc2a9
authored
May 19, 2020
by
jashaikh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Jacoco Code Coverage For Sonar.
parent
17e317fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
15 deletions
+17
-15
AzureAppConfigService.java
src/main/java/com/example/service/AzureAppConfigService.java
+11
-15
AzureAppConfigServiceTest.java
...t/java/com/example/service/AzureAppConfigServiceTest.java
+6
-0
No files found.
src/main/java/com/example/service/AzureAppConfigService.java
View file @
423fc2a9
...
...
@@ -86,24 +86,20 @@ public class AzureAppConfigService {
* Execute All Operation
*/
public
void
azureAppConfiguration
()
{
try
{
String
readValueByKey
=
getValueByKey
(
EXISTING_KEY
);
LOGGER
.
info
(
"Message: {}"
,
readValueByKey
);
String
readValueByKey
=
getValueByKey
(
EXISTING_KEY
);
LOGGER
.
info
(
"Message: {}"
,
readValueByKey
);
String
writeValueByKey
=
writeValueByKey
(
NEW_KEY
,
"Data Source URL"
);
LOGGER
.
info
(
"Data Source URL From Application: {}"
,
writeValueByKey
);
String
writeValueByKey
=
writeValueByKey
(
NEW_KEY
,
"Data Source URL"
);
LOGGER
.
info
(
"Data Source URL From Application: {}"
,
writeValueByKey
);
PagedIterable
<
ConfigurationSetting
>
readAllKeyValue
=
readAllKeyValue
();
readAllKeyValue
.
forEach
(
property
->
LOGGER
.
info
(
"Key: {} \t Value: {}"
,
property
.
getKey
(),
property
.
getValue
()));
PagedIterable
<
ConfigurationSetting
>
readAllKeyValue
=
readAllKeyValue
();
readAllKeyValue
.
forEach
(
property
->
LOGGER
.
info
(
"Key: {} \t Value: {}"
,
property
.
getKey
(),
property
.
getValue
()));
String
deleteValueByKey
=
deleteValueByKey
(
NEW_KEY
);
LOGGER
.
warn
(
"[Key: {} \t Value: {}] has been removed successfully"
,
NEW_KEY
,
deleteValueByKey
);
String
deleteValueByKey
=
deleteValueByKey
(
NEW_KEY
);
LOGGER
.
warn
(
"[Key: {} \t Value: {}] has been removed successfully"
,
NEW_KEY
,
deleteValueByKey
);
LOGGER
.
info
(
"After Removing Key-Value Read All Values..."
);
readAllKeyValue
=
readAllKeyValue
();
readAllKeyValue
.
forEach
(
property
->
LOGGER
.
info
(
"Key: {} \t Value: {}"
,
property
.
getKey
(),
property
.
getValue
()));
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
e
.
getMessage
(),
e
);
}
LOGGER
.
info
(
"After Removing Key-Value Read All Values..."
);
readAllKeyValue
=
readAllKeyValue
();
readAllKeyValue
.
forEach
(
property
->
LOGGER
.
info
(
"Key: {} \t Value: {}"
,
property
.
getKey
(),
property
.
getValue
()));
}
}
src/test/java/com/example/service/AzureAppConfigServiceTest.java
View file @
423fc2a9
...
...
@@ -81,4 +81,10 @@ class AzureAppConfigServiceTest {
void
deleteValueByKeyException
()
{
assertNull
(
azureAppConfigService
.
deleteValueByKey
(
null
));
}
@Test
@Order
(
8
)
void
testAzureAppConfiguration
()
{
azureAppConfigService
.
azureAppConfiguration
();
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
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