public void CanAttach_should_throw_execption_if_client_id_is_null() { var command = new AttachClient(); ValidationAssert.Throws(() => GuardAppClients.CanAttach(clients_0, command), new ValidationError("Client id is required.", "Id")); }
public void CanAttach_should_not_throw_exception_if_client_is_free() { var command = new AttachClient { Id = "ios" }; var clients_1 = clients_0.Add("android", "secret"); GuardAppClients.CanAttach(clients_1, command); }
public void CanAttach_should_throw_exception_if_client_already_exists() { var command = new AttachClient { Id = "android" }; var clients_1 = clients_0.Add("android", "secret"); Assert.Throws <ValidationException>(() => GuardAppClients.CanAttach(clients_1, command)); }
public void CanAttach_should_throw_exception_if_client_already_exists() { var command = new AttachClient { Id = "android" }; var clients_1 = clients_0.Add("android", "secret"); ValidationAssert.Throws(() => GuardAppClients.CanAttach(clients_1, command), new ValidationError("A client with the same id already exists.")); }
public void CanAttach_should_throw_execption_if_client_id_is_null() { var command = new AttachClient(); Assert.Throws <ValidationException>(() => GuardAppClients.CanAttach(clients_0, command)); }