1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// use crate::functions::Function;
use crate::error::Error;
use crate::parameter::ParameterStore;

pub struct Engine {
    // functions: Vec<Function>
}

impl Engine {
    pub fn new() -> Engine {
        Engine {

        }
    }

    pub fn render(&self, template: String, _parameters: ParameterStore) -> Result<String, Error> {
        Ok(template)
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_render() {
        let engine = Engine::new();
        let result = engine.render(String::from("Hello, World!"), ParameterStore::new());
        assert_eq!(result.unwrap(), "Hello, World!");
    }
}