public void GetEditionsByLanguageMethod_ByUA_ReturnsEmptyList()
        {
            //Arrange
            var mock = new Mock <IRepository <Edition> >();

            mock.Setup(a => a.List()).Returns(new List <Edition>()
            {
                new Edition()
                {
                    Name                = "Edition",
                    Description         = "Edition is Edition",
                    DateNextPublication = DateTime.UtcNow,
                    Language            = "ru"
                },
                new Edition()
                {
                    Name                = "Edition1",
                    Description         = "Edition is Edition1",
                    DateNextPublication = DateTime.UtcNow,
                    Language            = "eng"
                }
            });
            EditionServices service = new EditionServices(mock.Object);

            //Act
            var result = service.GetEditionsByLanguage("ua");

            //Assert
            Assert.AreEqual(0, result.Count());
        }
        public ActionResult Languages(string language)
        {
            var dbEditions = _editionService.GetEditionsByLanguage(language);
            var editions   = EditionModel.ToModelList(dbEditions.ToList());

            return(View("Index", editions));
        }
        public void GetEditionsByLanguageMethod_ReturnsEmptyList()
        {
            //Arrange
            var mock = new Mock <IRepository <Edition> >();

            mock.Setup(a => a.List()).Returns(new List <Edition>());
            EditionServices service = new EditionServices(mock.Object);

            //Act
            var result = service.GetEditionsByLanguage("eng");

            //Assert
            Assert.AreEqual(0, result.Count());
        }