Ejemplo n.º 1
0
        public void pesquisar_unico_release_banco_dados()
        {
            var releaseDAOMock = new Mock<IReleaseDAO>();
            releaseDAOMock.Setup(x => x.Get(It.IsAny<int>())).Returns(new Release());
            var releaseDAO = releaseDAOMock.Object;

            var releaseServico = new ReleaseServico(releaseDAO);
            Release release = releaseServico.Pesquisar(123);

            Assert.IsNotNull(release);
        }
Ejemplo n.º 2
0
        public void pesquisar_releases_banco_dados()
        {
            var releaseDAOMock = new Mock<IReleaseDAO>();
            releaseDAOMock.Setup(x => x.GetAll()).Returns(new List<Release>());
            var releaseDAO = releaseDAOMock.Object;

            var releaseServico = new ReleaseServico(releaseDAO);
            IList<Release> releases = releaseServico.PesquisarTodos();

            Assert.IsNotNull(releases);
        }
Ejemplo n.º 3
0
 public ReleasesController(ReleaseServico releaseServico)
 {
     _releaseServico = releaseServico;
 }