Ejemplo n.º 1
0
        public void UpdateHop_Gets_Updated()
        {
            var hop = _hopRepository.GetAll().LastOrDefault();

            hop.Name = "Updated " + DateTime.Now.Ticks;
            _hopRepository.Update(hop);
        }
Ejemplo n.º 2
0
        public void UpdateHop_Succeeded()
        {
            Hop hop = new Hop()
            {
                Code        = "ABCDEF123",
                Description = "This WH is awesome"
            };
            string code = _dal.Create(hop);

            Assert.AreEqual("ABCDEF123", code);

            hop.Description = "This is even better";

            _dal.Update(hop);

            hop = _dal.GetByCode(code);
            Assert.AreEqual("This is even better", hop.Description);
        }