Exemplo n.º 1
0
        private int CreateGroup(string name)
        {
            ICreateGroupApi api           = new CreateGroupApi(context);
            var             jsonContainer = new GroupApiJsonDataContainer();

            jsonContainer.Group = new Neuzilla.Wex.Core.Group.UserGroup()
            {
                Name = name
            };
            api.JsonData = jsonContainer;
            var response = api.Execute();

            return(response.Group.Id);
        }
Exemplo n.º 2
0
        public void TestCreateGroupApi()
        {
            ICreateGroupApi api           = new CreateGroupApi(context);
            var             jsonContainer = new GroupApiJsonDataContainer();

            jsonContainer.Group = new Neuzilla.Wex.Core.Group.UserGroup()
            {
                Name = "test"
            };
            api.JsonData = jsonContainer;
            var response = api.Execute();

            Assert.IsNotNull(response);
            Assert.IsTrue(response.Group.Id > 0);
            Assert.AreEqual("test", response.Group.Name);
            Assert.AreEqual(0, response.Group.Count);
        }