public void Verify_AreEqual_WithDifferentObjects_ReturnsFalse() { // Arrange var mapper = new SeriesAliasMapper(); var model = SeriesAliasesMockingSetup.DoMockingSetupForSeriesAliasModel(1); var entity = SeriesAliasesMockingSetup.DoMockingSetupForSeriesAlias(2); // Act var result = mapper.AreEqual(model.Object, entity.Object); // Assert Assert.False(result); }
public void Verify_MapToModelLite_AssignsLiteOnlySeriesAliasProperties() { // Arrange var mapper = new SeriesAliasMapper(); var entity = SeriesAliasesMockingSetup.DoMockingSetupForSeriesAlias(); // Act var model = mapper.MapToModelLite(entity.Object); // Assert // <None> // Related Objects Assert.Equal(entity.Object.SeriesId, model.SeriesId); }
public void Verify_MapToModelListingExtension_CallsMapToModel() { // Arrange var mockMapper = new Mock <SeriesAliasMapper>(); mockMapper.Setup(x => x.MapToModelListing(It.IsAny <ISeriesAlias>(), It.IsAny <int>())); var mockEntity = SeriesAliasesMockingSetup.DoMockingSetupForSeriesAlias(1); SeriesAliasMapperExtensions.OverrideMapper(mockMapper.Object); // Act mockEntity.Object.MapToModelListing(); // Assert mockMapper.Verify(x => x.MapToModelListing(It.IsAny <ISeriesAlias>(), It.IsAny <int>()), Times.Once); }