Beispiel #1
0
        public void GetByIdHappyPathSubCutaneous()
        {
            var context = new RaptorContext();

            context.RunWithRollback((ctx) =>
            {
                var stylist = ContextPopulator.GetStylistLicensee(ctx);

                var sut = new StylistLicenseeDataService(ctx);

                var actual = sut.GetById(stylist.Id);

                actual.ShouldNotBeNull();
                actual.Id.ShouldEqual(stylist.Id);
            });
        }
Beispiel #2
0
        public void GetByIdHappyPathSubcutaneous()
        {
            var context = new RaptorContext();

            context.RunWithRollback((ctx) =>
            {
                var barberLicensee = ContextPopulator.GetBarberLicensee(ctx);

                var sut = new BarberLicenseeDataService(ctx);

                var actual = sut.GetById(barberLicensee.Id);

                actual.ShouldNotBeNull();
                actual.Id.ShouldEqual(barberLicensee.Id);
            });
        }
Beispiel #3
0
        public void GetAllStylistLicenseesHappyPathSubCutaneous()
        {
            var context = new RaptorContext();

            context.RunWithRollback((ctx) =>
            {
                ContextPopulator.GetStylistLicensee(ctx);
                ContextPopulator.GetStylistLicensee(ctx);

                var sut = new StylistLicenseeDataService(ctx);

                var actual = sut.GetAllStylistLicensees();

                actual.ShouldNotBeNull();
                actual.Count().ShouldBeGreaterThan(1);
            });
        }
Beispiel #4
0
        public void GetByNameHappyPathSubcutaneous()
        {
            var context = new RaptorContext();

            context.RunWithRollback((ctx) =>
            {
                var barberLicensee1       = ContextPopulator.GetBarberLicensee(ctx);
                var barberLicensee2       = ContextPopulator.GetBarberLicensee(ctx);
                barberLicensee1.FirstName = "Sean";
                barberLicensee2.LastName  = "Sean";
                ctx.SaveChanges();

                var sut = new BarberLicenseeDataService(ctx);

                var actual = sut.GetByName("Sean");

                actual.ShouldNotBeNull();
                actual.Count().ShouldEqual(2);
                actual.Any(x => x.FirstName == "Sean").ShouldBeTrue();
                actual.Any(x => x.LastName == "Sean").ShouldBeTrue();
            });
        }