예제 #1
0
        // ReSharper disable once InconsistentNaming
        public void HasActor_Detects_If_Actor_Is_Loaded()
        {
            var actor = new Actor();

            var show = new Show();

            show.ShowsActors.Add(new ShowsActors(actor, null));

            Assert.True(show.HasActor(actor));
        }
예제 #2
0
        // ReSharper disable once InconsistentNaming
        public void HasActor_Does_Not_Detect_If_ActorId_Is_Zero()
        {
            var actor = new Actor();

            var show = new Show();

            show.ShowsActors.Add(new ShowsActors
                {
                    ActorId = 0
                });

            Assert.False(show.HasActor(actor));
        }
예제 #3
0
        // ReSharper disable once InconsistentNaming
        public void HasActors_Detects_If_ActorId_Matches()
        {
            var actor = new Actor
            {
                Id = 42
            };

            var show = new Show();

            show.ShowsActors.Add(new ShowsActors
                {
                    ActorId = actor.Id
                });

            Assert.True(show.HasActor(actor));
        }