sudachen / code_test_rs

My testing ground for playing with Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

codecov

This was originally my "Rust Coding Test" solution for some company that I won't name here.

In a few words, the original problem sounds like: "you need to implement a transaction processor which takes a CSV file and prints resulting accounts state".

image

So it must be processed as:

image

To be sure of my solution, I added some cucumber scripts to test the behavior of the solution a little more solid.

image

The code is divided into the following modules:

  • The module common defining constants, errors, traits Ledger, etc.
  • The module basic defining basic implementation of Ledger with HashMap.
  • The module libcsv defining csv processing functions.

The main program execute is in the src/bin subdirectory. It uses basic implementation of Ledger to process transactions from a CSV file.

About

My testing ground for playing with Rust.

License:MIT License


Languages

Language:Rust 87.0%Language:Gherkin 13.0%