Exemplo n.º 1
0
        public ActionResult DeleteAddress(int companyId, int addressId, int userId)
        {
            var res = CompanyAddress.Delete(companyId, addressId, userId);

            if (res.Success)
            {
                var companySession = new Company(companyId);
                HttpContext.Current.Session["Company"] = companySession;
            }

            return(res);
        }
Exemplo n.º 2
0
        public void DeleteItself()
        {
            //Arrange
            var companyMock = Mock.Of <Company>(x => x.Id == 1);
            var sut         = new CompanyAddress("Test Country", "Test State", "Test Town",
                                                 "Test Street", 87, 8, "00-000", companyMock);

            //Act
            sut.Delete();

            //Assert
            Assert.True(sut.Deleted);
        }