コード例 #1
0
        public void ReturnFalseIfObjectIsNotEqualAgendPoint()
        {
            //Arrange
            AgendaPoint agendaPoint;
            ContactInfo contact;

            //Act
            agendaPoint = new AgendaPoint("Titleff");
            contact     = new ContactInfo("*****@*****.**", "99999999");
            bool result = agendaPoint.Equals(contact);

            //Assert
            Assert.AreEqual(false, result);
        }
コード例 #2
0
        public void ReturnFalseIfNoUsingEqualsAndNotAAgenda()
        {
            //Arrange
            ContactInfo contact;
            Agenda      agenda;
            AgendaPoint agendaPoint;

            //Act
            agendaPoint = new AgendaPoint("fff");
            contact     = new ContactInfo("*****@*****.**", "99999999");
            agenda      = new Agenda("kdkdkd", agendaPoint);
            bool result = agenda.Equals(agendaPoint);

            //Assert
            Assert.AreEqual(result, false);
        }
コード例 #3
0
        public void CorrectInitialization()
        {
            // Arrange:
            string      Ttile = "Best Title";
            string      header = "Best Header";
            AgendaPoint firstPoint, secondPoint;
            Agenda      agenda;
            int         id = 1;

            // Act:
            firstPoint  = new AgendaPoint(header);
            secondPoint = new AgendaPoint(id, header);
            agenda      = new Agenda(Ttile, firstPoint);
            agenda.AddAgenda(secondPoint);
            agenda.ConclueCurrentAgendaPoint();

            // Assert:
            Assert.AreEqual(header, firstPoint.Header);
            Assert.AreEqual(Ttile, agenda.Title);
            Assert.AreEqual(0, firstPoint.Id);
            Assert.AreEqual(id, secondPoint.Id);
            Assert.AreEqual(secondPoint, agenda.CurrentAgendaPoint);
        }