public void GivenHappyPath_WhenCreateNewLicensePlate_ThenLicensePlateCreated()
        {
            //given
            var firstName = "firstName";
            var lastName  = "lastName";

            var city = new City(
                1234,
                "CityName",
                "CountryName"
                );

            Address address = Address.CreateAddress(
                "StreetName",
                "StreetNumber",
                city
                );
            var memberShipLevel = new MembershipLevel();
            var member          = Member.CreateMember(
                firstName,
                lastName,
                address,
                MembershipLevelEnum.Bronze,
                memberShipLevel
                );

            //when
            var licensePlate = LicensePlate.CreateLicensePlate(member.MemberId,
                                                               "1-ABC-123",
                                                               "Belgium");

            //then
            Assert.NotNull(licensePlate);
        }
        public void GivenLicensePlateWithLicensePlateValueNull_WhenCreateLicensePlate_ThenLicensePlateIsNull()
        {
            var firstName = "firstName";
            var lastName  = "lastName";

            var city = new City(
                1234,
                "CityName",
                "CountryName"
                );

            Address address = Address.CreateAddress(
                "StreetName",
                "StreetNumber",
                city
                );

            var memberShipLevel = new MembershipLevel();
            var member          = Member.CreateMember(
                firstName,
                lastName,
                address,
                MembershipLevelEnum.Bronze,
                memberShipLevel
                );


            var licensePlate = LicensePlate.CreateLicensePlate(member.MemberId,
                                                               null,
                                                               "Belgium");


            Assert.Null(licensePlate);
        }
Beispiel #3
0
        private List <LicensePlate> CreateLicensePlatesList(DummyMemberObject dummyMember, Member member)
        {
            List <LicensePlate> plates = new List <LicensePlate>();

            foreach (var item in dummyMember.LicensePlate)
            {
                plates.Add(LicensePlate.CreateLicensePlate(member.MemberId, item.LicensePlateValue, item.IssueingCountry));
            }
            return(plates);
        }