public void TestInitialize() { _mockBrandsReposiory = new Mock <IBrandsRepository>(); var mockUoW = new Mock <IUnitOfWork>(); mockUoW.SetupGet(u => u.Brands).Returns(_mockBrandsReposiory.Object); _brandsController = new BrandsController(mockUoW.Object); _brandsController.MockCurrentUser(_userId, _userName); }