public void ToDomain_WhenCalled_ReturnsContact()
        {
            ICreateContactCommand sut = CreateSut();

            IContact result = sut.ToDomain(_contactRepositoryMock.Object, _accountingRepositoryMock.Object);

            Assert.That(result, Is.TypeOf <Contact>());
        }
        public void ToDomain_WhenCalled_ReturnsContactWithoutExternalIdentifier()
        {
            ICreateContactCommand sut = CreateSut();

            string result = sut.ToDomain(_contactRepositoryMock.Object, _accountingRepositoryMock.Object).ExternalIdentifier;

            Assert.That(result, Is.Null);
        }
        public void ToDomain_WhenAccountingRepositoryIsNull_ThrowsArgumentNullException()
        {
            ICreateContactCommand sut = CreateSut();

            ArgumentNullException result = Assert.Throws <ArgumentNullException>(() => sut.ToDomain(_contactRepositoryMock.Object, null));

            Assert.That(result.ParamName, Is.EqualTo("accountingRepository"));
        }