Exemple #1
0
        protected override Project CreateSandboxProject(Project rootProject)
        {
            var mandatoryAttributes = new Dictionary <string, object>(1)
            {
                { "Scheme", DefaultSchemeOid }
            };

            return(EntityFactory.CreateProject(SandboxName, rootProject, mandatoryAttributes));
        }
Exemple #2
0
        public void CreateEnvironmentWithAttributesTest()
        {
            const string newName    = "AnotherName";
            var          newProject = EntityFactory.CreateProject("new project", SandboxProject, null);

            var attributes = new Dictionary <string, object> {
                { "Name", newName },
                { "Scope", newProject.ID.Token }
            };
            var environment = CreateEnvironment(EnvironmentName, attributes);

            ResetInstance();

            var filter = new EnvironmentFilter();

            filter.Name.Add(newName);
            filter.Project.Add(newProject);

            var environments = new List <Environment>(Instance.Get.Environments(filter));

            CollectionAssert.Contains(environments, environment);
            Assert.AreEqual(newProject, environments[0].Project);
            Assert.AreEqual(newName, environments[0].Name);
        }