コード例 #1
0
        public async Task GetCarProfilesTask_ReturnsCarProfile_EmailCorrect()
        {
            var testUser = TestModelFactory.CreateUserModel();
            var fakeUser = new User()
            {
                Email = testUser.Email
            };
            var fakeCarProfiles = new List <CarProfile>()
            {
                new CarProfile()
                {
                    OwnerEmail = testUser.Email,
                }
            };

            _fakeDbContext.GetUser(Arg.Any <string>(), Arg.Any <Guid>()).Returns(fakeUser);
            _fakeDbContext.GetAllCars(Arg.Any <User>()).Returns(fakeCarProfiles);

            await _uut.GetCarProfilesTask(testUser);

            _fakeDbToAppModelConverter.Received().Convert(Arg.Any <List <CarProfile> >());
        }