Exemplo n.º 1
0
        public void FindNonExistentAccountAcquisition()
        {
            var    accountCode = GetUniqueAccountCode();
            var    account     = new Account(accountCode);
            Action get         = () => AccountAcquisition.Get(account.AccountCode);

            get.ShouldThrow <NotFoundException>();
        }
Exemplo n.º 2
0
        public void CreateAccountWithAccountAcquisition()
        {
            var accountCode = GetUniqueAccountCode();
            var account     = new Account(accountCode);

            account.AccountAcquisition = NewAccountAcquisition(accountCode);
            account.Create();

            var acquisition = AccountAcquisition.Get(accountCode);

            VerifyTestAccountAcquisition(acquisition);
        }
Exemplo n.º 3
0
        public void CreateAccountAcquisitionWithMandatoryParameters()
        {
            var accountCode = GetUniqueAccountCode();
            var account     = new Account(accountCode);

            account.Create();

            var acquisition = new AccountAcquisition(accountCode);

            acquisition.Create();

            acquisition = AccountAcquisition.Get(account.AccountCode);
            acquisition.Should().NotBeNull();
        }
Exemplo n.º 4
0
        public void DeleteAccountAccountAcquisition()
        {
            var accountCode = GetUniqueAccountCode();
            var account     = new Account(accountCode);

            account.AccountAcquisition = NewAccountAcquisition(accountCode);
            account.Create();

            account.DeleteAccountAcquisition();
            account.AccountAcquisition.Should().BeNull();

            Action get = () => AccountAcquisition.Get(account.AccountCode);

            get.ShouldThrow <NotFoundException>();
        }
Exemplo n.º 5
0
        public void UpdateAccountAccountAcquisition()
        {
            var accountCode = GetUniqueAccountCode();
            var account     = new Account(accountCode);

            account.AccountAcquisition = NewAccountAcquisition(accountCode);
            account.Create();

            ModifyAccountAcquisition(account.AccountAcquisition);
            account.Update();

            var acquisition = AccountAcquisition.Get(accountCode);

            VerifyModifiedAccountAcquisition(acquisition);
        }