Ejemplo n.º 1
0
        public void ApoDivionShouldReturnFalseWhenDeleteFailed()
        {
            var service = new ApoDivisionService(_apoDivisionRepository, _apoGroupService);

            var sut = service.Delete(150);

            Assert.False(sut);
        }
Ejemplo n.º 2
0
        public void ApoDivisionShouldReturnTrueWhenDelteSuccess()
        {
            var service = new ApoDivisionService(_apoDivisionRepository, _apoGroupService);

            var sut = service.Delete(9);

            Assert.False(sut);
        }
Ejemplo n.º 3
0
        public void ApoDivisionShouldReturnFailWhenDeleteObjectThatHasChild()
        {
            var service = new ApoDivisionService(_apoDivisionRepository, _apoGroupService);

            var exception = Record.Exception(() => service.Delete(0));

            Assert.NotNull(exception);
            Assert.IsType <InvalidOperationException>(exception);
            Assert.True(exception.Message.Contains($"Id :{0} has child hierachy."));
        }