private BasicProvenance NewBasicProvenance()
        {
            this.mockContractState.Setup(s => s.Message.Sender).Returns(InitiatingCounterPartyAddress);

            var result = new BasicProvenance(this.mockContractState.Object, SupplyChainOwnerAddress, SupplyChainObserverAddress);

            // Reset the invocations that happened in the constructor so we don't accidentally test them.
            this.mockPersistentState.Invocations.Clear();

            return(result);
        }
        public void Constructor_Sets_Initial_Values()
        {
            this.mockContractState.Setup(s => s.Message.Sender).Returns(InitiatingCounterPartyAddress);

            var basicProvenance = new BasicProvenance(this.mockContractState.Object, SupplyChainOwnerAddress, SupplyChainObserverAddress);

            this.mockPersistentState.Verify(s => s.SetAddress(nameof(BasicProvenance.InitiatingCounterParty), InitiatingCounterPartyAddress));
            this.mockPersistentState.Verify(s => s.SetAddress(nameof(BasicProvenance.CounterParty), InitiatingCounterPartyAddress));
            this.mockPersistentState.Verify(s => s.SetAddress(nameof(BasicProvenance.SupplyChainOwner), SupplyChainOwnerAddress));
            this.mockPersistentState.Verify(s => s.SetAddress(nameof(BasicProvenance.SupplyChainObserver), SupplyChainObserverAddress));
            this.mockPersistentState.Verify(s => s.SetUInt32(nameof(BasicProvenance.State), (uint)BasicProvenance.StateType.Created));
        }