Beispiel #1
0
        public void GivenNewAccount_WhenInsert_ThenSendEmail()
        {
            //ARRANGE
            mockmail.Expect(x => x.Send("", "", "")).IgnoreArguments().Return(true);

            //ACT
            sut.AddAccount(new Account(), "");

            //ASSERT
            mockmail.VerifyAllExpectations();
        }
Beispiel #2
0
        public void GivenNewAccount_WhenInsert_ThenSendEmailAndLog()
        {
            //ARRANGE
            mockmail = MockRepository.GenerateStrictMock <ISendEmail>();
            ILogData mocklogData = MockRepository.GenerateStrictMock <ILogData>();

            sut = new AccountService(mockmail, _stubAccountRepository, mocklogData, new ChatContext());
            mockmail.Expect(x => x.Send("", "", "")).IgnoreArguments().Return(true);
            mocklogData.Expect(x => x.LogThis("")).IgnoreArguments();

            //ACT
            sut.AddAccount(new Account(), "");

            //ASSERT
            //mockmail.VerifyAllExpectations();
        }