diff --git a/content/authors/fanjups/_index.md b/content/authors/fanjups/_index.md index ad939c5..0b3bc97 100644 --- a/content/authors/fanjups/_index.md +++ b/content/authors/fanjups/_index.md @@ -1,6 +1,6 @@ --- -name: "Fanon Jupkwo" -images: [fanjups.jpg] +name: "fanjups" +images: ["fanjups.jpg"] twitter: "FanJups" --- diff --git a/content/post/articles/brute-force-attack-applied-in-a-useful-way-for-your-job-applications.md b/content/post/articles/brute-force-attack-applied-in-a-useful-way-for-your-job-applications.md index 8851c38..bd0694e 100644 --- a/content/post/articles/brute-force-attack-applied-in-a-useful-way-for-your-job-applications.md +++ b/content/post/articles/brute-force-attack-applied-in-a-useful-way-for-your-job-applications.md @@ -2,9 +2,9 @@ title: "Brute Force Attack Applied in a Useful Way for Your Job Applications" date: 2022-04-10T20:34:26+02:00 images: [] -categories: [Human Resources,Job Applications] -tags: [] -authors: [Fanon Jupkwo] +categories: ["Human Resources","Job Applications"] +tags: ["job","hr","jobsearch","linkedin","recruiter","experience","talentacquisitionspecialist"] +authors: ["fanjups"] --- Hi mates, Hope you are doing good. @@ -21,6 +21,4 @@ This approach works like a charm. How does it work? Search on LinkedIn: **"{comp This is a tip that I always use on LinkedIn. -Have a nice job application journey 🙂 ! - -**#job #hr #jobsearch #linkedin #recruiter #experience #talentacquisitionspecialist** +Have a nice job application journey 🙂 ! \ No newline at end of file diff --git a/content/post/articles/test-legacy-code.md b/content/post/articles/test-legacy-code.md new file mode 100644 index 0000000..a7ce329 --- /dev/null +++ b/content/post/articles/test-legacy-code.md @@ -0,0 +1,50 @@ +--- +title: "Test Legacy Code" +date: 2022-05-29T09:31:19+01:00 +images: [] +categories: [] +tags: ["TDD","TestDrivenDevelopment","Java","Maven","Tests","LegacyCode"] +authors: ["fanjups"] +--- + + +I remind myself that 7 years ago I didn't know TDD (Test Driven Development). What's funny is that I heard the word "TDD" for the first time while being interviewed 😂, Genius 👏👏👏! I was just testing manually. + +As an app, I updated myself since then. + +2 years ago, I got a legacy project from a friend. It didn't even use a code management tool like Maven so I began by turning this Java project to a Maven one. + +**Then, the big question : HOW TO TEST IT ?** + +I was figuring out how to add tests. It was really tough. **How to test without breaking anything ? How to test a project I have never seen before ?** + +This book from Lasse Kokela helped me to do that. It's a game changer 💯 : https://www.manning.com/books/test-driven + +I will share what I learned from this book in order to add tests to legacy code. + +1- It is really simple, first just create an interface **IFeatureClass** from the production ready class **FeatureClass** already present in your codebase. + +IDEs have this option _"Extract an interface from ..."_. Now, you have 2 classes : the interface and your production class implementing. + +`class FeatureClass implements IFeatureClass { }` + +2- Then, create another class **FeatureClassTestEnv** extending that feature class **FeatureClass.** This new class represents the feature class in the test environment. + +Here, it's up to you to override what's necessary. Maybe, you'll override the Database connection method in order to use a list of objects instead of the production database. + +`class FeatureClassTestEnv extends FeatureClass { }` + +At this stage, you have 3 classes. + +Finally, you will create a 4th class **FeatureClassTests** containing your tests. + +``` +class FeatureClassTests { + + + IFeatureClass features = new FeatureClassTestEnv(); + +// Write your tests here + +} +``` diff --git a/content/post/contributors/fanjups.md b/content/post/contributors/fanjups.md index fd4f211..8c3e551 100644 --- a/content/post/contributors/fanjups.md +++ b/content/post/contributors/fanjups.md @@ -1,8 +1,8 @@ --- -title: "Fanjups" +title: "Fanon Jupkwo" date: 2022-04-10T21:02:56+02:00 images: [] -authors: ["Fanon Jupkwo"] +authors: ["fanjups"] --- Hello World & Welcome to Planet FanJups 🚀 👋 @@ -14,10 +14,11 @@ As an app, I regularly update myself. I'm a Java Software Engineer working on Open Source and Non-Open Source projects. Open Source projects: - +https://blog.osscameroon.com/post/contributors/fanjups/ - [Open Source Society Cameroon's jsGenerator](https://github.com/osscameroon/js-generator/commits?author=FanJups) - [Google's Mug Project ](https://github.com/google/mug/commits?author=FanJups) - [Société Générale's ArchUnit Build Plugin Core Project](https://github.com/societe-generale/arch-unit-build-plugin-core/commits?author=FanJups) +- [Société Générale's ArchUnit Build Maven Plugin Project](https://github.com/societe-generale/arch-unit-maven-plugin/commits?author=FanJups) - [Microsoft's Spring Cloud Azure](https://github.com/microsoft/spring-cloud-azure/commits?author=FanJups) - [Apple's ServiceTalk](https://github.com/apple/servicetalk/commits?author=FanJups)