Esempio n. 1
0
        public void QueryTests()
        {
            var cmd = new Features.Query {
            };

            Assert.IsNotNull(cmd);
            var           handler = new Features.RequestHandler(new Data.DataContextFactory());
            Task <EditVM> result  = handler.Handle(cmd, System.Threading.CancellationToken.None);
            EditVM        editVM  = result.Result;

            Assert.IsNotNull(editVM);
        }
Esempio n. 2
0
        public void DeleteTests()
        {
            var cmd = new Features.Delete {
                Id = 3
            };

            Assert.IsNotNull(cmd);

            var         handler = new Features.RequestHandler(new Data.DataContextFactory());
            Task <bool> result  = handler.Handle(cmd, System.Threading.CancellationToken.None);

            Assert.IsTrue(result.Result);
        }
Esempio n. 3
0
        public void CreateTests()
        {
            var cmd = new Features.Create {
                EditVM = new EditVM {
                }
            };

            Assert.IsNotNull(cmd);
            cmd.EditVM.LegalName   = "Legal Name";
            cmd.EditVM.TradingName = string.Empty;
            cmd.EditVM.Address1    = "123 W. Address st.";
            cmd.EditVM.Address2    = string.Empty;
            cmd.EditVM.City        = "Glendale";
            cmd.EditVM.Post        = "91203";
            var         handler = new Features.RequestHandler(new Data.DataContextFactory());
            Task <bool> result  = handler.Handle(cmd, System.Threading.CancellationToken.None);

            Assert.IsTrue(result.Result);
        }