Mercurial > altnet-hispano
annotate Agendas/trunk/src/Agendas.Tests/IdentityContextTests.cs @ 202:a731086c0b28
Se soluciona ticket 174.
Además se agrega detalle del campo Hora y Duración cuando son obligatorios en Resources.
author | alabra |
---|---|
date | Sat, 20 Aug 2011 18:40:36 -0400 |
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 } |