コード例 #1
0
        public void PrecioMaxNegativoLanzaExcepcion()
        {
            BibliotecaPerfiles perfil = BibliotecaPerfiles.Instance;

            perfil.CrearUsuario(0);
            Assert.Throws <ArgumentOutOfRangeException>(() => EditorPerfil.SetPrecioMax(0, -21));
        }
コード例 #2
0
        public void PrecioMaxMenorQuePrecioMinLanzaExcepcion()
        {
            BibliotecaPerfiles perfil = BibliotecaPerfiles.Instance;

            perfil.CrearUsuario(0);
            BibliotecaPerfiles.GetUsuario(0).PrecioMin = 500;
            Assert.Throws <ArgumentOutOfRangeException>(() => EditorPerfil.SetPrecioMax(0, 300));
        }
コード例 #3
0
 public void EdadMuyGrandeLanzaExcepcion()
 {
     Assert.Throws <ArgumentOutOfRangeException>(() => EditorPerfil.SetEdad(0, 300));
 }
コード例 #4
0
 public void EdadNegativaLanzaExcepcion()
 {
     Assert.Throws <ArgumentOutOfRangeException>(() => EditorPerfil.SetEdad(0, -21));
 }