Exemplo n.º 1
0
        public void MapEntityToModel_Returns_IUserModel_When_Given_Valid_Entities()
        {
            IUserModel modelFromTuple      = _mapper.MapEntityToModel((_testUser, _testUserProfile));
            IUserModel modelFromParameters = _mapper.MapEntityToModel(_testUser, _testUserProfile);

            Assert.That(modelFromTuple, Is.Not.Null.And.InstanceOf <IUserModel>());
            Assert.That(modelFromParameters, Is.Not.Null.And.InstanceOf <IUserModel>());

            Assert.AreEqual(modelFromTuple, modelFromParameters,
                            $"{nameof(modelFromTuple)}: {modelFromTuple.GetHashCode()} != {nameof(modelFromParameters)}: {modelFromParameters.GetHashCode()}");
        }