Esempio n. 1
0
        public void CreateDataBaseEvent()
        {
            Guid InvitationTestGuid = Guid.NewGuid();
            DataBaseInvitation dataBaseInvitation = new DataBaseInvitation(InvitationTestGuid, "*****@*****.**");


            List <DataBaseInvitation> dataBaseInvitations = new List <DataBaseInvitation>
            {
                dataBaseInvitation
            };


            Guid participantTestGuid = Guid.NewGuid();
            DataBaseParticipant DataBaseParticipant = new DataBaseParticipant
            {
                Id = participantTestGuid,
                ContactInformation = new DataBaseContactInformation {
                    Id = Guid.NewGuid(), Email = "*****@*****.**", FirstName = "TestFirstName", LastName = "TestLastname"
                }
            };
            List <DataBaseParticipant> dataBaseParticipants = new List <DataBaseParticipant>
            {
                DataBaseParticipant
            };

            DataBaseEventFactory _dataBaseEventFactory = new DataBaseEventFactory();

            Guid          eventTestGuid = Guid.NewGuid();
            DataBaseEvent dataBaseEvent = _dataBaseEventFactory.CreateDataBaseEvent(eventTestGuid, "A great name on a great party", "A great description", DateTime.Now, dataBaseInvitations, dataBaseParticipants);

            Assert.Equal(eventTestGuid, dataBaseEvent.Id);
            Assert.Equal(participantTestGuid, dataBaseEvent.Participants.First().Id);
            Assert.Equal(InvitationTestGuid, dataBaseEvent.SentInvitations.First().Id);
        }
Esempio n. 2
0
        public void EntityEventToDataBaseEvent()
        {
            IEvent            @event = SetUpEvent();
            DataBaseConverter dataBaseEventConverter = new DataBaseConverter();
            DataBaseEvent     databaseEvent          = dataBaseEventConverter.EntityEventToDataBaseEvent(@event);

            Assert.Equal(@event.Id, databaseEvent.Id);
            Assert.Equal(@event.Name, databaseEvent.Name);
            Assert.Equal(@event.Description, databaseEvent.Description);
            Assert.Equal(@event.StartDate, databaseEvent.StartDate);
        }
 public DatabaseAdvanced(DataBaseEvent databaseEvent, AllDatabasesManager adbm)
 {
     InitializeComponent();
     _databaseEvent = databaseEvent;
     _adbm = adbm;
 }