Learn the different ways of extracting certificates from a website or a server and mapping it to either a pem format or a pkcs12 container as a truststore.
We discuss how to easily configure an SSL/TLS connection in Java to secure your application better. This setup can also easily be used for Scala and Kotlin.
Thank you very much! Yes, that is also possible. What you need to do is call a different method on the LogCapture instance which is already available. It contains the exception as an object and it also contains other properties. You can try the snippet below:
In the the example unit test below, having only the info level enabled should log your debug messages should be In the the example unit test below, having only the info level enabled should not log your debug messages Your suggestion is also good, more explicit In the the example unit test below, having only the info level enabled stops your debug messages from being logged
I will think about it and adjust it, thank you Julian!
Hi Julian, thank you for sharing your solution! It is interesting to see how you guys have found your own solution for testing log messages. It is kinda similar but also different as AndroidLogAssert also has the capability of asserting directly based on the expression which has been supplied. Also awesome to see that it has support for regex! In my solution I decided at some point in time to not provide asserting functions so the end-user can decide how to assert. some prefer Harmcrest Matchers others use AssertJ etc. It has pros but also cons... But I am wondering if LogCaptor would work on android/logcat, did you tried it out? Again thank you for sharing your solution, you gave me new insights to think about!
Hi Brandt, I'm happy to hear that this tutorial helped you out and that you already found the answer two your own issue. If you still have other issues, please drop it here: https://github.com/Hakky54/mutual-tls-ssl/issues
Hi Nick, you are right. It is hard to copy the code examples which are long. I will ask the admin of DZone to seek together for a solution. Meanwhile you can use this github page: https://github.com/Hakky54/mutual-tls-ssl
The same tutorial is available there including a horizontal scroll bar
Comments
Apr 17, 2021 · Hakan Altındağ
It looks like my example code is not correctly formatted. You can also see here the example: https://github.com/Hakky54/log-captor#unit-test-2
Apr 17, 2021 · Hakan Altındağ
Thank you very much! Yes, that is also possible. What you need to do is call a different method on the LogCapture instance which is already available. It contains the exception as an object and it also contains other properties. You can try the snippet below:
Jan 05, 2021 · Hakan Altındağ
Well spotted, I think it is missing a word.
In the the example unit test below, having only the info level enabled should log your debug messages
should be
In the the example unit test below, having only the info level enabled should not log your debug messages
Your suggestion is also good, more explicit
In the the example unit test below, having only the info level enabled stops your debug messages from being logged
I will think about it and adjust it, thank you Julian!
Jan 03, 2021 · Hakan Altındağ
Hi Julian, thank you for sharing your solution! It is interesting to see how you guys have found your own solution for testing log messages. It is kinda similar but also different as AndroidLogAssert also has the capability of asserting directly based on the expression which has been supplied. Also awesome to see that it has support for regex! In my solution I decided at some point in time to not provide asserting functions so the end-user can decide how to assert. some prefer Harmcrest Matchers others use AssertJ etc. It has pros but also cons... But I am wondering if LogCaptor would work on android/logcat, did you tried it out? Again thank you for sharing your solution, you gave me new insights to think about!
Aug 13, 2020 · Hakan Altındağ
Hi Brandt, I'm happy to hear that this tutorial helped you out and that you already found the answer two your own issue. If you still have other issues, please drop it here: https://github.com/Hakky54/mutual-tls-ssl/issues
Dec 16, 2019 · Hakan Altındağ
Hi Nick, you are right. It is hard to copy the code examples which are long. I will ask the admin of DZone to seek together for a solution. Meanwhile you can use this github page: https://github.com/Hakky54/mutual-tls-ssl
The same tutorial is available there including a horizontal scroll bar