示例#1
0
        public void CanAttach_should_throw_exception_if_client_already_exists()
        {
            var command = new AttachClient {
                Id = "android"
            };

            clients.Add("android", "secret");

            Assert.Throws <ValidationException>(() => GuardAppClients.CanAttach(clients, command));
        }
示例#2
0
        public void CanAttach_should_not_throw_exception_if_client_is_free()
        {
            var command = new AttachClient {
                Id = "ios"
            };

            clients.Add("android", "secret");

            GuardAppClients.CanAttach(clients, command);
        }
示例#3
0
        public void CanAttach_should_throw_execption_if_client_id_is_null()
        {
            var command = new AttachClient();

            Assert.Throws <ValidationException>(() => GuardAppClients.CanAttach(clients, command));
        }