public void Map_DomainToTransfer_Test()
        {
            //Arrange
            IDiagnosticsMapper mapper = new DiagnosticsMapper();
            var domainDiagnostics = new Diagnostics
            {
                DiagnosticsId = 1,
                Date = new DateTime(2015, 1, 1),
                EntityState = EntityState.Unchanged,
                ExceptionName = "NewException",
                Message = "Error",
                UserId = 1
            };
            var expectedTransferDiagnostics = new TransferDiagnosticsLikeness
            {
                DiagnosticsId = 1,
                Date = new DateTime(2015, 1, 1),
                EntityState = EntityState.Unchanged,
                ExceptionName = "NewException",
                Message = "Error",
                UserId = 1
            };

            //Act
            var actualTransferDiagnostics = mapper.Map(domainDiagnostics);

            //Assert
            Assert.That(actualTransferDiagnostics, Is.EqualTo(expectedTransferDiagnostics));
        }
Beispiel #2
0
        public void Map_DomainToTransfer_Test()
        {
            //Arrange
            IDiagnosticsMapper mapper = new DiagnosticsMapper();
            var domainDiagnostics     = new Diagnostics
            {
                DiagnosticsId = 1,
                Date          = new DateTime(2015, 1, 1),
                EntityState   = EntityState.Unchanged,
                ExceptionName = "NewException",
                Message       = "Error",
                UserId        = 1
            };
            var expectedTransferDiagnostics = new TransferDiagnosticsLikeness
            {
                DiagnosticsId = 1,
                Date          = new DateTime(2015, 1, 1),
                EntityState   = EntityState.Unchanged,
                ExceptionName = "NewException",
                Message       = "Error",
                UserId        = 1
            };

            //Act
            var actualTransferDiagnostics = mapper.Map(domainDiagnostics);

            //Assert
            Assert.That(actualTransferDiagnostics, Is.EqualTo(expectedTransferDiagnostics));
        }