Exemplo n.º 1
0
        public void SDCaseCreate(List <SDCase> items, SDCase item)
        {
            var apiWrapper = GetWrapper <SDCase>();

            apiWrapper.EntityKeyName = "SDCase";
            apiWrapper.EntitySetName = "SDCases";
            if (item == null && items == null)
            {
                apiWrapper.Item = SDCaseSample();
            }
            else
            {
                apiWrapper.Item  = item;
                apiWrapper.Items = items;
            }
            var resultCreate = Services.ApiCreate(url, apiWrapper);

            Assert.IsTrue(resultCreate == "ok");
            if (apiWrapper.Item != null)
            {
                apiWrapper.ItemKey = apiWrapper.Item.GuidCase;
                var existent = Services.ApiGetByKey <SDCase>(url, apiWrapper);
                Assert.IsNotNull(existent);
            }
        }
Exemplo n.º 2
0
        public SDCase SDCaseSample()
        {
            SDCase item = new SDCase();

            item.GuidCase = Guid.NewGuid();



            item.ClosedDateTime = Utils.GetDateTime();


            item.BodyContent = Utils.GetString(10);

            item.PreviewContent = Utils.GetString(10);


            item.Title = Utils.GetString(10);



            return(item);
        }