コード例 #1
0
        public void ShouldRestoreBooleansValue(bool value)
        {
            // Arrange
            var client = new ZohoContact("*****@*****.**");

            // Act
            client.SetValue("EmailOptOut", value);

            // Assert
            Assert.That(client.GetValue <bool>("EmailOptOut"), Is.EqualTo(value));
        }
コード例 #2
0
        public void ShouldStoreBooleansInLowerCase(bool value)
        {
            // Arrange
            var client = new ZohoContact("*****@*****.**");

            // Act
            client.SetValue("EmailOptOut", value);

            // Assert
            Assert.That(client.GetValue <string>("EmailOptOut"), Is.EqualTo(value.ToString().ToLower()));
        }
コード例 #3
0
        public ZohoInsertResponse AddContact(string id, ZohoContact contact)
        {
            if (contact == null)
            {
                throw new ArgumentNullException("contact");
            }

            // this issues a call to the service...
            // account.ParentAccount = RequireById(id).Name;
            // instead, this is faster and lighter, but not it doesn't check
            // for the parent account to exist ...
            contact.SetValue("ACCOUNTID", id);
            return(Client.InsertRecord(contact));
        }