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
//! # Environment for Square API calls

/// The Square API environment
#[derive(Clone, Debug, PartialEq)]
pub enum Environment {
    Mock,
    Sandbox,
    Production,
}

impl Default for Environment {
    /// The default Square API environment
    fn default() -> Self {
        Environment::Sandbox
    }
}

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

    #[test]
    fn test_default() {
        assert_eq!(Environment::default(), Environment::Sandbox);
    }
}