Beispiel #1
0
 /// <summary>
 /// Reloads the mapping file.
 /// </summary>
 public void ReloadMappingFile()
 {
     // Force a reload by setting the mapping information to null
     this.projectMappingInformation = null;
     this.mappingFileInfo           = null;
     this.Reloaded(this, new EventArgs());
 }
Beispiel #2
0
        public void TestProjectMappingInformationSerialization()
        {
            string stringResentation =
                GenericSerializer.Serialize <ProjectMappingInformation>(info);

            ProjectMappingInformation deserializedInfo =
                GenericSerializer.Deserialize <ProjectMappingInformation>(stringResentation);

            Assert.AreEqual(info.FileName, deserializedInfo.FileName, "Not Equal");
            Assert.AreEqual(info.ProjectMappingTables.Count, deserializedInfo.ProjectMappingTables.Count, "Not Equal");
            Assert.AreEqual(info.ProjectMappingTables[0].Name, deserializedInfo.ProjectMappingTables[0].Name, "Not Equal");
            Assert.AreEqual(info.ProjectMappingTables[0].ProjectMappings.Count, deserializedInfo.ProjectMappingTables[0].ProjectMappings.Count, "Not Equal");
            Assert.AreEqual(info.ProjectMappingTables[0].ProjectMappings[0].ProjectId, deserializedInfo.ProjectMappingTables[0].ProjectMappings[0].ProjectId, "Not Equal");
            Assert.AreEqual(info.ProjectMappingTables[0].ProjectMappings[0].ProjectPath, deserializedInfo.ProjectMappingTables[0].ProjectMappings[0].ProjectPath, "Not Equal");
            Assert.AreEqual(info.ProjectMappingTables[0].ProjectMappings[0].Roles.Count, deserializedInfo.ProjectMappingTables[0].ProjectMappings[0].Roles.Count, "Not Equal");
            Assert.AreEqual(info.ProjectMappingTables[0].ProjectMappings[0].Roles[0].Name, deserializedInfo.ProjectMappingTables[0].ProjectMappings[0].Roles[0].Name, "Not Equal");
        }
Beispiel #3
0
        public void Setup()
        {
            projectId = Guid.NewGuid();
            Role role  = new Role("FooRole");
            Role role1 = new Role("FooRole1");

            ProjectMapping.Configuration.ProjectMappingEntry projectMapping =
                new ProjectMapping.Configuration.ProjectMappingEntry(
                    projectId,
                    @"\", "FooName");
            projectMapping.Roles.Add(role);
            projectMapping.Roles.Add(role1);

            ProjectMappingTable mappingTable = new ProjectMappingTable("Foo");

            mappingTable.ProjectMappings.Add(projectMapping);

            info = new ProjectMappingInformation("Foo.rolemapping");
            info.ProjectMappingTables.Add(mappingTable);
        }