Ejemplo n.º 1
0
        public async Task UpdateAsync_WhenCalled_ShouldCreate()
        {
            var item = await _resource.UpdateAsync(new GroupUpdateRequest(1)
            {
                Name = "name.1.new"
            });

            Assert.Equal(1, item.Id);
            Assert.Equal("name.1.new", item.Name);
        }
Ejemplo n.º 2
0
        public async Task ShouldUpdateGroup()
        {
            var group = await _resource.CreateAsync(new GroupCreateRequest("I'm a group!"));

            Assert.Equal("I'm a group!", group.Name);

            var groupUpdate = await _resource.UpdateAsync(new GroupUpdateRequest(group.Id)
            {
                Name = "Im a new group!"
            });

            Assert.Equal("Im a new group!", groupUpdate.Name);
        }