Mercurial > altnet-hispano
annotate Agendas/trunk/src/Agendas.Tests/IdentityContextTests.cs @ 197:bfd472758bc3
Agregando validaciones para subir el Coverage.
author | juanjose.montesdeocaarbos |
---|---|
date | Sat, 13 Aug 2011 02:40:00 -0300 |
parents | 1deccd6c3cb2 |
children |
rev | line source |
---|---|
179 | 1 using AltNetHispano.Agendas.Domain; |
2 using NUnit.Framework; | |
3 | |
4 namespace AltNetHispano.Agendas.Tests | |
5 { | |
6 [TestFixture] | |
7 public class IdentityContextTests : TestBase | |
8 { | |
9 [Test] | |
10 public void IsInRole() | |
11 { | |
12 var persona = new Persona("Nelo"); | |
13 persona.Roles.Add(Roles.Usuario); | |
14 | |
15 Assert.IsTrue(IdentityContext.IsInRole(persona, new[] { Roles.Usuario })); | |
16 Assert.IsFalse(IdentityContext.IsInRole(persona, new[] { Roles.Administrador })); | |
17 } | |
18 } | |
19 } |