Skip to content

jmardyla/Remitly-Solution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Remitly Internship Assignment Solution - Jan Mardyła, Kraków, 2024

This repository includes both the project with all the source code and tests code, as well as an executable fat-jar file, sufficient for running the program.


Prerequisites

How to run

  1. Download the jar from the repository or clone the whole repository
  2. Navigate to the location of the .jar file
  3. java -jar ./remitly-verifier-1.0.jar <path-to-JSON-policy-file>

Example

Example Usage Screenshot

Alternatively

You can use the jar file as a Java library. Add it to your project and then you can use it like this:

import remitly.verify.IncorrectPolicyFormatException;
import remitly.verify.RolePolicyVerifier;

import java.io.FileNotFoundException;

public class Main {
    public static void main(String[] args) {
        RolePolicyVerifier verifier = null;
        try {
            verifier = new RolePolicyVerifier("src/policy.json");

            boolean result = verifier.verifyPolicy();
            System.out.println("Policy verification result: " + result);
        } catch (FileNotFoundException | IncorrectPolicyFormatException e) {
            System.err.println(e.getMessage());
            e.printStackTrace();
        }
    }
}

Tech Stack

  • Java Oracle OpenJDK version 17
  • Gson 2.10.1
  • JUnit 5.9.0
  • Maven 3

About

Solution to a home assignment, done as part of Remitly internship recruitment process for summer 2024.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages