Skip to content

Based on a set of rules (base) and some additional rules that override the base ones two values are calculated (H, K), this is a demo for the backend design + test coverage

Notifications You must be signed in to change notification settings

puma3/rules-assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rules Assignment

Structure

The repository is composed of three folders: rules-lib, rules-server and rules-client containing the code for the rules logic, server and web client respectively.

Execution

Note that the nightly toolchain of Rust is required to compile rules-server.

In a terminal instance execute:

cd rules-server
cargo +nightly run

In a different terminal instance execute:

cd rules-client
yarn install
yarn start

Navigate to http://localhost:3000/, you should see a page similar to the animation below. Change the values and test the responses.

Recording 2020-11-12 22-02

Unit testing

Unit testing was implemented for rules-lib only and the tests are present in src/rules.rs. To execute them type or paste the following commands:

cd rules-lib
cargo test

About

Based on a set of rules (base) and some additional rules that override the base ones two values are calculated (H, K), this is a demo for the backend design + test coverage

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published