public void Verify_AreEqual_WithDifferentObjects_ReturnsFalse() { // Arrange var mapper = new TeamAppearedInIssueMapper(); var model = TeamAppearedInIssuesMockingSetup.DoMockingSetupForTeamAppearedInIssueModel(1); var entity = TeamAppearedInIssuesMockingSetup.DoMockingSetupForTeamAppearedInIssue(2); // Act var result = mapper.AreEqual(model.Object, entity.Object); // Assert Assert.False(result); }
public void Verify_MapToModelLite_AssignsLiteOnlyTeamAppearedInIssueProperties() { // Arrange var mapper = new TeamAppearedInIssueMapper(); var entity = TeamAppearedInIssuesMockingSetup.DoMockingSetupForTeamAppearedInIssue(); // Act var model = mapper.MapToModelLite(entity.Object); // Assert // <None> // Related Objects Assert.Equal(entity.Object.TeamId, model.TeamId); Assert.Equal(entity.Object.IssueId, model.IssueId); }
public void Verify_MapToModelListingExtension_CallsMapToModel() { // Arrange var mockMapper = new Mock <TeamAppearedInIssueMapper>(); mockMapper.Setup(x => x.MapToModelListing(It.IsAny <ITeamAppearedInIssue>(), It.IsAny <int>())); var mockEntity = TeamAppearedInIssuesMockingSetup.DoMockingSetupForTeamAppearedInIssue(1); TeamAppearedInIssueMapperExtensions.OverrideMapper(mockMapper.Object); // Act mockEntity.Object.MapToModelListing(); // Assert mockMapper.Verify(x => x.MapToModelListing(It.IsAny <ITeamAppearedInIssue>(), It.IsAny <int>()), Times.Once); }