Example #1
0
        public async Task CloneOrganization()
        {
            var source = await _organizationsApi.CreateOrganizationAsync(GenerateName("Constant Pro"));

            var name = GenerateName("cloned");

            var cloned = await _organizationsApi.CloneOrganizationAsync(name, source);

            Assert.AreEqual(name, cloned.Name);
        }
Example #2
0
        public async Task CloneOrganization()
        {
            var source = await _organizationsApi.CreateOrganizationAsync(GenerateName("Constant Pro"));

            var properties = new Dictionary <string, string> {
                { "color", "green" }, { "location", "west" }
            };
            var name = GenerateName("cloned");

            var cloned = await _organizationsApi.CloneOrganizationAsync(name, source);

            Assert.AreEqual(name, cloned.Name);
        }
Example #3
0
        public async Task CloneOrganization()
        {
            var source = await _organizationsApi.CreateOrganizationAsync(GenerateName("Constant Pro"));

            var properties = new Dictionary <string, string> {
                { "color", "green" }, { "location", "west" }
            };

            var label = await Client.GetLabelsApi().CreateLabelAsync(GenerateName("Cool Resource"), properties, source.Id);

            await _organizationsApi.AddLabelAsync(label, source);

            var name = GenerateName("cloned");

            var cloned = await _organizationsApi.CloneOrganizationAsync(name, source);

            Assert.AreEqual(name, cloned.Name);

            var labels = await _organizationsApi.GetLabelsAsync(cloned);

            Assert.AreEqual(1, labels.Count);
            Assert.AreEqual(label.Id, labels[0].Id);
        }