public void CreateBindable()
 {
     BindableWithCollection<SimpleBusinessObject, SimpleBusinessObject>
         bindableWithCollection = new BindableWithCollection<SimpleBusinessObject,SimpleBusinessObject>
             (new SimpleBusinessObject());
     Assert.IsNotNull(bindableWithCollection);
 }
        public void UndoRedoProperties()
        {
            Boxerp.Client.BindableWithCollection<SimpleBusinessObject, SimpleBusinessObject>
                bindableWithCollection = new BindableWithCollection<SimpleBusinessObject,SimpleBusinessObject>
                    (new SimpleBusinessObject());

            bindableWithCollection.Data.Collection.Add(
                new BindableWrapper<SimpleBusinessObject>(new SimpleBusinessObject()));

            bindableWithCollection.Data.Collection[0].Data.BusinessObj.Name = "whatever";

            bindableWithCollection.Data.Collection[0].Data.BusinessObj.Name = "somethingelse";

            bindableWithCollection.Undo();

            Assert.AreEqual(bindableWithCollection.Data.Collection[0].Data.BusinessObj.Name, "somethingelse");

            bindableWithCollection.Redo();

            Assert.AreEqual(bindableWithCollection.Data.Collection[0].Data.BusinessObj.Name, "somethingelse");

            bindableWithCollection.Data.BusinessObj.Name = "asdf";

            bindableWithCollection.Data.BusinessObj.Name = "qwerty";

            bindableWithCollection.Undo();

            Assert.AreEqual(bindableWithCollection.Data.BusinessObj.Name, "asdf");

            bindableWithCollection.Redo();

            Assert.AreEqual(bindableWithCollection.Data.BusinessObj.Name, "qwerty");
        }
        public void ChangeProperties()
        {
            Boxerp.Client.BindableWithCollection<SimpleBusinessObject, SimpleBusinessObject>
                bindableWithCollection = new BindableWithCollection<SimpleBusinessObject,SimpleBusinessObject>
                    (new SimpleBusinessObject());

            bindableWithCollection.Data.Collection.Add(
                new BindableWrapper<SimpleBusinessObject>(new SimpleBusinessObject()));
            bindableWithCollection.Data.Collection[0].Data.BusinessObj.Name = "whatever";
            bindableWithCollection.Data.BusinessObj.Name = "asdf";
            Assert.AreEqual(bindableWithCollection.Data.BusinessObj.Name, "asdf");
        }