public void NonActiveInsertFails()
        {
            var arg = new MockMarketState();
            var moq = new Mock <ISimpleRepo <InactiveLeaseDTO> >();
            var sut = new InactiveLeasesRepo1(moq.Object, arg);
            var lse = new InactiveLeaseDTO();

            arg.MoqActiveLeases.Setup(_
                                      => _.HasId(lse.Id)).Returns(false);

            sut.Invoking(_ => _.Insert(lse))
            .Should().Throw <InvalidInsertionException>();
        }
        public void ErrorifrecordundeletedforActives()
        {
            var arg = new MockMarketState();
            var moq = new Mock <ISimpleRepo <InactiveLeaseDTO> >();
            var sut = new InactiveLeasesRepo1(moq.Object, arg);
            var lse = new InactiveLeaseDTO {
                Id = 1234
            };

            arg.MoqActiveLeases.SetupSequence(_
                                              => _.HasId(lse.Id)).Returns(true)
            .Returns(true);

            sut.Invoking(_ => _.Insert(lse))
            .Should().Throw <InvalidStateException>();
        }