public void Get_UserNotFound_ReturnsUnauthorized()
        {
            var mockUserCache = MockRepository.GenerateStub<IUserCache>();
            mockUserCache.Expect(x => x.GetUsers())
                .Return(new Dictionary<string, User>());

            var controller = new CanController(mockUserCache);
            var user = "******";
            var action = "testAction";

            var actual = controller.Get(user, action);

            Assert.That(actual.StatusCode, Is.EqualTo(HttpStatusCode.Unauthorized));
        }
        public void Get_UserAuthorized_ReturnsOk()
        {
            var mockUserCache = MockRepository.GenerateStub<IUserCache>();
            mockUserCache.Expect(x => x.GetUsers())
                .Return(new Dictionary<string, User>
                {
                    {
                        "testUser", new User
                        {
                            Name = "testUser",
                            Actions = new[] {"testAction"}
                        }
                    }
                });

            var controller = new CanController(mockUserCache);
            var user = "******";
            var action = "testAction";

            var actual = controller.Get(user, action);

            Assert.That(actual.StatusCode, Is.EqualTo(HttpStatusCode.OK));
        }