Beispiel #1
0
        public void AccountClientCreateAccountReturnsInt()
        {
            // Arrange
            var account = new Account()
            {
                AccountKey  = 123,
                AccountCode = "TEST123",
                AccountName = "Test Account",
                AccountDesc = "Test Account Description",
                AccountDBA  = "Test Account DBA"
            };
            var mockAccountClient = new Mock <IAccountService>();

            mockAccountClient.Setup(m => m.CreateAccount(It.IsAny <Account>())).Returns(123);

            // SUT
            var sut = new AccountClient(EndpointConfiguration.NetTcpBinding_IAccountService);

            // Act
            var ret_val = sut.CreateAccount(account);

            // Assert
            Assert.Equal(123, ret_val);
        }