Beispiel #1
0
        public void mustSaveASubModel()
        {
            InformacaoExtra _infoExtra = new InformacaoExtra(_workspace);

            _infoExtra.CodigoInformacaoExtra = 99;
            _infoExtra.CodigoPontoNotavel    = 0;
            _infoExtra.Informacoes           = "Testes Novos com SubModel";

            _infoExtra.Save();

            PontoNotavel _pn = new PontoNotavel(_workspace);

            _pn.Codigo          = 88;
            _pn.Descricao       = "Testando a inclusao por uma camada transparente.";
            _pn.Nome            = "Teste Inclusao.";
            _pn.InformacaoExtra = _infoExtra;
            IPoint _ponto = new PointClass();

            _ponto.PutCoords(-5118733.117, -2667994.655);

            _pn.Geometry = _ponto;

            _pn.Save();

            _pn.Load(88);

            Assert.IsNotNull(_pn.InformacaoExtra);
            Assert.AreEqual(_pn.InformacaoExtra.Informacoes, "Testes Novos com SubModel");
            _pn.Delete();
        }
Beispiel #2
0
        public void mustSaveAModel()
        {
            InformacaoExtra _infoExtra = new InformacaoExtra(_workspace);

            _infoExtra.CodigoInformacaoExtra = 1;
            _infoExtra.CodigoPontoNotavel    = 1;
            _infoExtra.Informacoes           = "Testes";

            _infoExtra.Save();
        }
Beispiel #3
0
        public void mustLoadAModel()
        {
            mustSaveAModel();
            InformacaoExtra _infoExtra = new InformacaoExtra(_workspace);

            _infoExtra.Load(1);

            Assert.AreEqual(_infoExtra.CodigoInformacaoExtra, 1);
            Assert.AreEqual(_infoExtra.CodigoPontoNotavel, 1);
            Assert.AreEqual(_infoExtra.Informacoes, "Testes");
            _infoExtra.Delete();
        }
Beispiel #4
0
        public void mustDeleteAModel()
        {
            mustSaveAModel();
            InformacaoExtra _infoExtra = new InformacaoExtra(_workspace);

            _infoExtra.Load(1);
            _infoExtra.Delete();

            InformacaoExtra _infoExtraResultado = new InformacaoExtra(_workspace);

            _infoExtraResultado.Load(1);
            Assert.IsNull(_infoExtraResultado.Informacoes);
        }
Beispiel #5
0
        public void mustSearchSomeFeatures()
        {
            mustSaveAModel();
            InformacaoExtra _infoExtra  = new InformacaoExtra(_workspace);
            var             _infosExtra = _infoExtra.Search("InformacaoExtra.CodigoPontoNotavel = 1");

            foreach (InformacaoExtra _item in _infosExtra)
            {
                Assert.AreEqual(_item.Informacoes, "Testes");
            }

            Assert.IsTrue(_infosExtra.Count > 0);
            _infoExtra.Load(1);
            _infoExtra.Delete();
        }
Beispiel #6
0
        public void mustUpdateAModel()
        {
            mustSaveAModel();
            InformacaoExtra _infoExtra = new InformacaoExtra(_workspace);

            _infoExtra.Load(1);

            _infoExtra.Informacoes = "Sem Testes";

            _infoExtra.Update();

            InformacaoExtra _infoExtraResultado = new InformacaoExtra(_workspace);

            _infoExtraResultado.Load(1);
            Assert.AreEqual(_infoExtraResultado.Informacoes, "Sem Testes");
            _infoExtra.Delete();
        }
Beispiel #7
0
        public void mustSaveANullDate()
        {
            InformacaoExtra _infoExtra = new InformacaoExtra(_workspace);

            _infoExtra.CodigoInformacaoExtra = 1;
            _infoExtra.CodigoPontoNotavel    = 1;
            _infoExtra.Informacoes           = "Testes";
            _infoExtra.DataCadastro          = DateTime.Now.Date;
            _infoExtra.Save();

            Assert.IsNotNull(_infoExtra.DataCadastro);
            _infoExtra.DataCadastro = null;
            _infoExtra.Update();

            InformacaoExtra _infoExtraB = new InformacaoExtra(_workspace);

            _infoExtraB.Load(_infoExtra.CodigoInformacaoExtra);
            Assert.IsNull(_infoExtraB.DataCadastro);
        }