extern crate ntlm;
extern crate rustc_serialize as serialize;

use ntlm::messages::{MessageType1, BinaryEncodable};
use serialize::base64::{ToBase64, STANDARD};

#[test]
fn new_message_type_1() {
	let host = String::from("localhost");
	let domain = String::from("test");
	let m = MessageType1::new(&host.clone().into_bytes(), &domain.clone().into_bytes());

	if String::from_utf8(m.host).unwrap() == host &&  String::from_utf8(m.domain).unwrap() == domain 
 else {
		assert!(false);
	}
}

#[test]
fn encode_message_type_1() {
	let host = String::from("localhost");
	let domain = String::from("test");
	let m = MessageType1::new(&host.clone().into_bytes(), &domain.clone().into_bytes());

	let enc = m.encode();

	assert_eq!(enc.to_base64(STANDARD), "TlRMTVNTUAABAAAAAAAAAAAEAAQAKQAAAAkACQAgAABsb2NhbGhvc3R0ZXN0");
}

#[test]
fn decode_message_type_1() {

}
{
		assert!(true);
	}