Ejemplo n.º 1
0
        public void RetrieveContentFields_ShouldReturnHotProducts()
        {
            var keys        = new string[] { "hotproducts" };
            var hotProducts = butterClient.RetrieveContentFields <HotProductsResponse>(keys);

            Assert.IsNotNull(hotProducts);
        }
Ejemplo n.º 2
0
        public void  RetrieveContentFields_ShouldThrowContentFieldObjectMismatchException()
        {
            var butterClient = new ButterCMSClient("321478403e868f0fc41f0115731f330ff720ce0b");
            var keys         = new string[2] {
                "team_members[name=Elon]", "homepage_headline"
            };

            Assert.Throws <ContentFieldObjectMismatchException>(() => butterClient.RetrieveContentFields <string>(keys));
        }
Ejemplo n.º 3
0
        public void RetrieveContentFields_ShouldReturnTeamMembersHeadline()
        {
            var butterClient = new ButterCMSClient("321478403e868f0fc41f0115731f330ff720ce0b");
            var keys         = new string[2] {
                "team_members[name=Elon]", "homepage_headline"
            };
            var teamMembersAndHeadline = butterClient.RetrieveContentFields <TeamMembersHeadline>(keys);

            Assert.IsNotNull(teamMembersAndHeadline);
        }