public void FindRoleByNameReturnsNullWhenRollNotPresent()
		{
			Guid projectGuid = Guid.NewGuid();
			Collection<Role> roles = new Collection<Role>();
			roles.Add(new Role("foo"));
			roles.Add(new Role("bar"));

            Config.ProjectMappingEntry mapping = new Config.ProjectMappingEntry(projectGuid, "\\", roles, "FooName");

			Role result = mapping.FindRoleByName("baz");

			Assert.IsNull(result, "No role should be returned");
		}
        public void FindRoleByNameReturnsNullWhenRollNotPresent()
        {
            Guid projectGuid        = Guid.NewGuid();
            Collection <Role> roles = new Collection <Role>();

            roles.Add(new Role("foo"));
            roles.Add(new Role("bar"));

            Config.ProjectMappingEntry mapping = new Config.ProjectMappingEntry(projectGuid, "\\", roles, "FooName");

            Role result = mapping.FindRoleByName("baz");

            Assert.IsNull(result, "No role should be returned");
        }
		public void FindRoleByNameReturnsRoleWhenPresent()
		{
			string roleToFind = "foo";
			Guid projectGuid = Guid.NewGuid();
			Collection<Role> roles = new Collection<Role>();
			roles.Add(new Role(roleToFind));
			roles.Add(new Role("bar"));
            Config.ProjectMappingEntry mapping = new Config.ProjectMappingEntry(projectGuid, "\\", roles, "FooName");

			Role result = mapping.FindRoleByName(roleToFind);

			Assert.IsNotNull(result, "No role returned when one should exist");
			Assert.AreEqual(roleToFind, result.Name, "Role name does not match role searched for");
		}
        public void FindRoleByNameReturnsRoleWhenPresent()
        {
            string            roleToFind  = "foo";
            Guid              projectGuid = Guid.NewGuid();
            Collection <Role> roles       = new Collection <Role>();

            roles.Add(new Role(roleToFind));
            roles.Add(new Role("bar"));
            Config.ProjectMappingEntry mapping = new Config.ProjectMappingEntry(projectGuid, "\\", roles, "FooName");

            Role result = mapping.FindRoleByName(roleToFind);

            Assert.IsNotNull(result, "No role returned when one should exist");
            Assert.AreEqual(roleToFind, result.Name, "Role name does not match role searched for");
        }