Ejemplo n.º 1
0
        public void ShouldGetCurrentAccount()
        {
            var client = new CodeSchoolRestClient("scottksmith95");
            var result = client.GetAccount();

            Assert.IsNotNull(result);
            Assert.IsNull(result.RestException);
            Assert.AreEqual(result.user.username, "scottksmith95");
        }
Ejemplo n.º 2
0
        public void ShouldGetErrorAccountForEmpty()
        {
            var client = new CodeSchoolRestClient("");
            var result = client.GetAccount();

            Assert.IsNotNull(result);
            Assert.IsNotNull(result.RestException);
            Assert.IsNotNull(result.RestException.error);
            Assert.AreEqual(result.RestException.error.message, "Houston, we have a problem.");
        }