Struct mockito::mock::Mock [] [src]

pub struct Mock {
    pub method: String,
    pub path: String,
    pub headers: HashMap<StringString>,
    // some fields omitted
}

Fields

method: String path: String headers: HashMap<StringString>

Methods

impl Mock
[src]

fn new(method: &str, path: &str) -> Mock

fn from(request: &Request) -> Option<Mock>

fn header(self, field: &str, value: &str) -> Self

fn respond_with(self, response: &str) -> Self

fn respond_with_file(self, path: &str) -> Self

fn register(&self)

fn response(&self) -> String

fn matches(&self, request: &Request) -> bool