public void Verify_AreEqual_WithDifferentObjects_ReturnsFalse() { // Arrange var mapper = new CharacterFriendlyTeamMapper(); var model = CharacterFriendlyTeamsMockingSetup.DoMockingSetupForCharacterFriendlyTeamModel(1); var entity = CharacterFriendlyTeamsMockingSetup.DoMockingSetupForCharacterFriendlyTeam(2); // Act var result = mapper.AreEqual(model.Object, entity.Object); // Assert Assert.False(result); }
public void Verify_MapToModelLite_AssignsLiteOnlyCharacterFriendlyTeamProperties() { // Arrange var mapper = new CharacterFriendlyTeamMapper(); var entity = CharacterFriendlyTeamsMockingSetup.DoMockingSetupForCharacterFriendlyTeam(); // Act var model = mapper.MapToModelLite(entity.Object); // Assert // <None> // Related Objects Assert.Equal(entity.Object.CharacterId, model.CharacterId); Assert.Equal(entity.Object.FriendlyTeamId, model.FriendlyTeamId); }
public void Verify_MapToModelListingExtension_CallsMapToModel() { // Arrange var mockMapper = new Mock <CharacterFriendlyTeamMapper>(); mockMapper.Setup(x => x.MapToModelListing(It.IsAny <ICharacterFriendlyTeam>(), It.IsAny <int>())); var mockEntity = CharacterFriendlyTeamsMockingSetup.DoMockingSetupForCharacterFriendlyTeam(1); CharacterFriendlyTeamMapperExtensions.OverrideMapper(mockMapper.Object); // Act mockEntity.Object.MapToModelListing(); // Assert mockMapper.Verify(x => x.MapToModelListing(It.IsAny <ICharacterFriendlyTeam>(), It.IsAny <int>()), Times.Once); }