Beispiel #1
0
        public async Task InsertActorTestAsync(string firstname, string lastname, bool expectedSuccess,
                                               int expectedActorId, int expectedCountAfter)
        {
            const int expectedCountBefore = 25;
            var       actor = new Actor {
                Firstname = firstname, Lastname = lastname
            };

            var actors = await actorLogic.FindAllAsync();

            Assert.Equal(expectedCountBefore, actors.Count());

            var status = await actorLogic.InsertAsync(actor);

            Assert.Equal(expectedActorId, actor.ActorId);
            Assert.Equal(expectedCountAfter, actors.Count());
            Assert.Equal(expectedSuccess, status);
        }
Beispiel #2
0
 public async Task <IEnumerable <Actor> > GetAll()
 {
     return(await actorLogic.FindAllAsync());
 }