예제 #1
0
        public When_All_Referrals_Are_Same()
        {
            var viewModelReferrals = new List <Domain.Models.Referral>
            {
                new Domain.Models.Referral {
                    ProviderVenueId = 1, DistanceFromEmployer = 11
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 2, DistanceFromEmployer = 22
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 3, DistanceFromEmployer = 33
                }
            };

            var databaseReferrals = new List <Domain.Models.Referral>
            {
                new Domain.Models.Referral {
                    ProviderVenueId = 1, DistanceFromEmployer = 1
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 2, DistanceFromEmployer = 2
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 3, DistanceFromEmployer = 3
                }
            };

            var referralDifference = new ReferralDifference(new ReferralEqualityComparer());

            _dto = referralDifference.Get(viewModelReferrals, databaseReferrals);
        }
예제 #2
0
        public When_One_Referral_Is_Added_And_One_Deleted()
        {
            var viewModelReferrals = new List <Domain.Models.Referral>
            {
                new Domain.Models.Referral {
                    ProviderVenueId = 1, DistanceFromEmployer = 1
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 3, DistanceFromEmployer = 3
                }
            };

            var databaseReferrals = new List <Domain.Models.Referral>
            {
                new Domain.Models.Referral {
                    ProviderVenueId = 1, DistanceFromEmployer = 1
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 2, DistanceFromEmployer = 2
                }
            };

            var referralDifference = new ReferralDifference(new ReferralEqualityComparer());

            _dto = referralDifference.Get(viewModelReferrals, databaseReferrals);
        }
        public When_One_Referral_Is_Added_And_Five_Deleted()
        {
            var viewModelReferrals = new List <Domain.Models.Referral>
            {
                new Domain.Models.Referral {
                    ProviderVenueId = 1, OpportunityItemId = OpportunityItemId
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 7, OpportunityItemId = OpportunityItemId
                }
            };

            var databaseReferrals = new List <Domain.Models.Referral>
            {
                new Domain.Models.Referral {
                    ProviderVenueId = 1, OpportunityItemId = OpportunityItemId
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 2, OpportunityItemId = OpportunityItemId
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 3, OpportunityItemId = OpportunityItemId
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 4, OpportunityItemId = OpportunityItemId
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 5, OpportunityItemId = OpportunityItemId
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 6, OpportunityItemId = OpportunityItemId
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 6, OpportunityItemId = 2
                }
            };

            var referralDifference = new ReferralDifference(new ReferralEqualityComparer());

            _dto = referralDifference.Get(viewModelReferrals, databaseReferrals);
        }
예제 #4
0
        public When_All_Referrals_Are_Deleted()
        {
            var viewModelReferrals = new List <Domain.Models.Referral>();

            var databaseReferrals = new List <Domain.Models.Referral>
            {
                new Domain.Models.Referral {
                    ProviderVenueId = 1
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 2
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 3
                }
            };

            var referralDifference = new ReferralDifference(new ReferralEqualityComparer());

            _dto = referralDifference.Get(viewModelReferrals, databaseReferrals);
        }
예제 #5
0
        public When_Two_Referrals_Are_Added_And_Two_Deleted_And_Two_Updated()
        {
            var viewModelReferrals = new List <Domain.Models.Referral>
            {
                new Domain.Models.Referral {
                    ProviderVenueId = 1, DistanceFromEmployer = 1
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 3, DistanceFromEmployer = 3
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 6, DistanceFromEmployer = 6
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 7, DistanceFromEmployer = 7
                }
            };

            var databaseReferrals = new List <Domain.Models.Referral>
            {
                new Domain.Models.Referral {
                    ProviderVenueId = 4, DistanceFromEmployer = 4
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 5, DistanceFromEmployer = 5
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 6, DistanceFromEmployer = 6
                },
                new Domain.Models.Referral {
                    ProviderVenueId = 7, DistanceFromEmployer = 7
                }
            };

            var referralDifference = new ReferralDifference(new ReferralEqualityComparer());

            _dto = referralDifference.Get(viewModelReferrals, databaseReferrals);
        }