# Copyright (c) 2009 bivio Software, Inc. All Rights Reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: RealmSettingList.bunit,v 1.4 2009/05/05 00:42:18 nagler Exp $ ListModel(); req()->set_realm('fourem'); [ get_multiple_settings => [ [RealmSettingList1 => alpha => [[qw(num Integer)], [qw(name Name)]]] => [{num => 1, name => 'alpha'}], ], get_all_settings => [ [RealmSettingList1 => [ [qw(let Name)], [qw(less Line)], ]] => [{ alpha => {let => 'a', less => 'arithmetic'}, beta => {let => 'b', less => 'default-lesson'}, }], ], get_setting => [ [qw(RealmSettingList1 alpha num Integer)] => 1, [qw(RealmSettingList1 beta letter Name)] => 'b', [qw(RealmSettingList1 beta lesson String)] => 'default-lesson', [qw(RealmSettingList1 beta lesson StringArray)] => [StringArray('default-lesson')], [qw(RealmSettingList1 alpha other StringArray)] => [StringArray('')], [qw(RealmSettingList1 beta other StringArray)] => [StringArray('default-other')], [qw(RealmSettingList1 alpha le String xyz)] => 'xyz', [qw(RealmSettingList1 not-found num Integer)] => 4242, [qw(NotFound alpha num Integer)] => [undef], [qw(NotFound alpha num Integer 3)] => 3, [qw(NotFound alpha letter Integer), sub {return @_ ? die(@_) : 13}] => 13, [qw(RealmSettingList1 alpha letter Integer), sub {'not-' . shift}] => 'not-default-letter', [qw(RealmSettingList2 alpha num Integer 99)] => 99, [qw(RealmSettingList3 a num Integer)] => [undef], [qw(RealmSettingList1 alpha num Integer)] => 1, sub { req()->set_realm('btest_read'); return [qw(RealmSettingList1 alpha num Integer 99)]; } => 99, ], ];