/* Copyright (C) 2004 - 2005  db4objects Inc.  http://www.db4o.com

This file is part of the db4o open source object database.

db4o is free software; you can redistribute it and/or modify it under
the terms of version 2 of the GNU General Public License as published
by the Free Software Foundation and as clarified by db4objects' GPL 
interpretation policy, available at
http://www.db4o.com/about/company/legalpolicies/gplinterpretation/
Alternatively you can write to db4objects, Inc., 1900 S Norfolk Street,
Suite 350, San Mateo, CA 94403, USA.

db4o 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 General Public License
for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. */
using System;

namespace com.db4o.test
{
	public class ArrayNOrder
	{
        public String[,,] s1;
        public Object[,] o1;

        public void store() {
            Tester.deleteAllInstances(this);
            s1 = new String[2,2,3];
            s1[0,0,0] = "000";
            s1[0,0,1] = "001";
            s1[0,0,2] = "002";
            s1[0,1,0] = "010";
            s1[0,1,1] = "011";
            s1[0,1,2] = "012";
            s1[1,0,0] = "100";
            s1[1,0,1] = "101";
            s1[1,0,2] = "102";
            s1[1,1,0] = "110";
            s1[1,1,1] = "111";
            s1[1,1,2] = "112";

            o1 = new object[2,2];
            o1[0,0] = 0;
            o1[0,1] = "01";
            o1[1,0] = (float)10;
            o1[1,1] = (double)1.1;
            Tester.store(this);
        }

        public void test() {
            ArrayNOrder ano = (ArrayNOrder)Tester.getOne(this);
            ano.check();
        }
    
        public void check(){
            Tester.ensure(s1[0,0,0].Equals("000"));
            Tester.ensure(s1[0,0,1].Equals("001"));
            Tester.ensure(s1[0,0,2].Equals("002"));
            Tester.ensure(s1[0,1,0].Equals("010"));
            Tester.ensure(s1[0,1,1].Equals("011"));
            Tester.ensure(s1[0,1,2].Equals("012"));
            Tester.ensure(s1[1,0,0].Equals("100"));
            Tester.ensure(s1[1,0,1].Equals("101"));
            Tester.ensure(s1[1,0,2].Equals("102"));
            Tester.ensure(s1[1,1,0].Equals("110"));
            Tester.ensure(s1[1,1,1].Equals("111"));
            Tester.ensure(s1[1,1,2].Equals("112"));
            Tester.ensure(o1[0,0].Equals(0));
            Tester.ensure(o1[0,1].Equals("01"));
            Tester.ensure(o1[1,0].Equals((float)10));
            Tester.ensure(o1[1,1].Equals((double)1.1));
        }
    
    }
}
