view Agendas/trunk/src/Agendas.Tests/IdentityContextTests.cs @ 289:8b0c62c255cd

Se modifica DataAnnotationAndConventionModelMetadataProvider.cs para que lea Recursos en base al Assembly Fullname
author juanjose.montesdeocaarbos
date Tue, 07 Feb 2012 23:28:20 -0300
parents 1deccd6c3cb2
children
line wrap: on
line source

using AltNetHispano.Agendas.Domain;
using NUnit.Framework;

namespace AltNetHispano.Agendas.Tests
{
	[TestFixture]
	public class IdentityContextTests : TestBase
	{
		[Test]
		public void IsInRole()
		{
			var persona = new Persona("Nelo");
			persona.Roles.Add(Roles.Usuario);

			Assert.IsTrue(IdentityContext.IsInRole(persona, new[] { Roles.Usuario }));
			Assert.IsFalse(IdentityContext.IsInRole(persona, new[] { Roles.Administrador }));
		}
	}
}