daml/daml-lf/tests/AuthTests.daml
Gary Verhaegen d2e2c21684
update copyright headers (#12240)
New year, new copyright, new expected unknown issues with various files
that won't be covered by the script and/or will be but shouldn't change.

I'll do the details on Jan 1, but would appreciate this being
preapproved so I can actually get it merged by then.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-03 16:36:51 +00:00

62 lines
1.3 KiB
Haskell

-- Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
-- SPDX-License-Identifier: Apache-2.0
module AuthTests where
template T1 with
party : Party
where
signatory party
nonconsuming choice Choice1 : ContractId T2
with
party1 : Party
party2 : Party
controller party2
do
create T2 with party1; party2
template T2 with
party1 : Party
party2 : Party
where
signatory [party1,party2]
----------------------------------------------------------------------
-- templates for exercise-within-exercise testcase
template X1 with
party : Party
where
signatory party
nonconsuming choice ChoiceA : ContractId X2
with
cid : ContractId X1
controllerA : Party
controllersB : [Party]
party1 : Party
party2 : Party
party3 : Party
controller controllerA
do
exercise cid ChoiceB with controllersB; party1; party2; party3
nonconsuming choice ChoiceB : ContractId X2
with
controllersB : [Party]
party1 : Party
party2 : Party
party3 : Party
controller controllersB
do
create X2 with party1; party2; party3
template X2 with
party1 : Party
party2 : Party
party3 : Party
where
signatory [party1,party2,party3]