Inheritance: RestObject, ISearchable
        public void DeleteEmailTest()
        {
            var emailName = Guid.NewGuid().ToString();
            var email = new Email
                            {
                                name = emailName,
                                emailGroupId = 1
                            };

            email = _client.Assets.Email.Post(email);
            _client.Assets.Email.Delete(email.id);

            var result = _client.Assets.Email.Get(emailName, 1, 1);
            Assert.AreEqual(0, result.elements.Count);
        }
        public void PostEmailTest()
        {
            Email email = null;

            try
            {
                var expectedEmail = new Email
                                        {
                                            emailGroupId = 1,
                                            name = string.Format("test-{0}", Guid.NewGuid())
                                        };

                email = _client.Assets.Email.Post(expectedEmail);
                Assert.AreEqual(expectedEmail.name, email.name);
            }
            finally
            {
                if (email != null && email.id > 0)
                {
                    _client.Assets.Email.Delete(email.id);
                }
            }
        }