Пример #1
0
 public void ActorBornLocation()
 {
     //create an instance of the class
     Actor NewActor = new Actor();
     //test the id of the movie
     string TestActorBornLocation = "Leicester";
     NewActor.BornLocation = TestActorBornLocation;
     //test to see if that exists
     Assert.AreEqual(NewActor.BornLocation, TestActorBornLocation);
 }
Пример #2
0
        public void ActorBornLocationExtremeMinimumLength()
        {
            Actor NewActor = new Actor();
            Boolean valid = false;
            int actorId = 1;
            string lastName = new string('A', Actor.textMidLength);
            string firstMidName = new string('A', Actor.textMidLength);
            DateTime dateOfBirth = new DateTime(1990, 07, 30);
            string bornName = new string('A', Actor.textMidLength);
            string bornLocation = new string('A', Actor.textExtremeMin);
            string liveLocation = new string('A', Actor.textMidLength);

            valid = NewActor.Valid(actorId, lastName, firstMidName, dateOfBirth, bornName, bornLocation, liveLocation);
        }
Пример #3
0
        public void ActorBornLocationMaximumMinusOne()
        {
            Actor NewActor = new Actor();
            Boolean valid = false;
            int actorId = 1;
            string lastName = new string('A', Actor.textMidLength);
            string firstMidName = new string('A', Actor.textMidLength);
            DateTime dateOfBirth = new DateTime(1990, 07, 30);
            string bornName = new string('A', Actor.textMidLength);
            string bornLocation = new string('A', Actor.textMaximumLength - 1);
            string liveLocation = new string('A', Actor.textMidLength);

            valid = NewActor.Valid(actorId, lastName, firstMidName, dateOfBirth, bornName, bornLocation, liveLocation);
            Assert.IsTrue(valid);
        }
Пример #4
0
        public void ActorLatestDatePlusOne()
        {
            Actor NewActor = new Actor();
            Boolean valid = false;
            int ActorId = 1;
            string lastName = new string('A', Actor.textMidLength);
            string firstMidName = new string('A', Actor.textMidLength);
            DateTime dateOfBirth = Actor.latestDate.AddDays(+1);
            string bornName = new string('A', Actor.textMidLength);
            string bornLocation = new string('A', Actor.textMidLength);
            string liveLocation = new string('A', Actor.textMidLength);

            valid = NewActor.Valid(ActorId, lastName, firstMidName, dateOfBirth, bornName, bornLocation, liveLocation);
        }
Пример #5
0
        public void ActorLastNameOk()
        {
            //create an instance of the class
            Actor NewActor = new Actor();

            string TestActorLastName = "Johnson";
            NewActor.LastName = TestActorLastName;
            //test to see if that exists
            Assert.AreEqual(NewActor.LastName, TestActorLastName);
        }
Пример #6
0
 public void ActorInstanceOK()
 {
     //create an instance of the class
     Actor NewActor = new Actor();
     //test to see if that exists
     Assert.IsNotNull(NewActor);
 }
Пример #7
0
        public void ActorID()
        {
            //create an instance of the class
            Actor NewActor = new Actor();

            Int32 TestActorId = 1;
            NewActor.ActorId = TestActorId;
            //test to see if that exists
            Assert.AreEqual(NewActor.ActorId, TestActorId);
        }
Пример #8
0
        public void ActorFirstNameOk()
        {
            //create an instance of the class
            Actor NewActor = new Actor();

            string TestActorFirstName = "Luke";
            NewActor.FirstMidName = TestActorFirstName;
            //test to see if that exists
            Assert.AreEqual(NewActor.FirstMidName, TestActorFirstName);
        }
Пример #9
0
        public void ActorEarliestDate()
        {
            Actor NewActor = new Actor();
            Boolean valid = false;
            int ActorId = 1;
            string lastName = new string('A', Actor.textMidLength);
            string firstMidName = new string('A', Actor.textMidLength);
            DateTime dateOfBirth = Actor.earliestDate;
            string bornName = new string('A', Actor.textMidLength);
            string bornLocation = new string('A', Actor.textMidLength);
            string liveLocation = new string('A', Actor.textMidLength);

            valid = NewActor.Valid(ActorId, lastName, firstMidName, dateOfBirth, bornName, bornLocation, liveLocation);
            Assert.IsTrue(valid);
        }
Пример #10
0
 public void ActorDateOfBirthOK()
 {
     Actor NewActor = new Actor();
     DateTime testDateOfBirth = new DateTime(1990, 07, 30);
     NewActor.DateOfBirth = testDateOfBirth;
     Assert.AreEqual(NewActor.DateOfBirth, testDateOfBirth);
 }