public async void Create_InvalidNewCompany_RedirectsToManage()
        {
            CompaniesController controller = new CompaniesController(null);
            controller.ModelState.AddModelError("key", "error message");

            var result = await controller.Create("") as RedirectToRouteResult;

            Assert.That(result != null);
            Assert.That(result.RouteValues["action"], Is.EqualTo("Manage"));
            Assert.That(result.RouteValues["newCompanyName"], Is.EqualTo(""));
        }
        public async void Create_ValidNewCompany_RedirectsToManage()
        {
            List<Company> companies = new List<Company>
            {
                new Company
                {
                    Name = "FirstCompany",
                    DevelopedGameProducts = new List<GameProduct>(),
                    PublishedGameProducts = new List<GameProduct>()
                }
            };

            Mock<IVeilDataAccess> dbStub = TestHelpers.GetVeilDataAccessFake();
            Mock<DbSet<Company>> companyDbSetStub = TestHelpers.GetFakeAsyncDbSet(companies.AsQueryable());
            companyDbSetStub.Setup(db => db.Add(It.IsAny<Company>())).Callback<Company>(companies.Add);
            dbStub.Setup(db => db.Companies).Returns(companyDbSetStub.Object);

            CompaniesController controller = new CompaniesController(dbStub.Object);

            var result = await controller.Create("NewCompany") as RedirectToRouteResult;

            Assert.That(result != null);
            Assert.That(result.RouteValues["action"], Is.EqualTo("Manage"));
            Assert.That(companies.Count, Is.EqualTo(2));
        }