public static void ClassInit( TestContext context )
        {
            _creds = GooCalCreds.CreateAndValidate();
            _calendarPurge = (CalendarPurge)CalendarPurgeFactory.Create( _creds );
            _service = _calendarPurge.GoogleCalendarService;

            DeleteAllEvents();
        }
        /// <summary>
        /// Calendar Purge Factory.
        /// </summary>
        /// <param name="credentials">The credentials to log into the calendar.</param>
        /// <returns>An <see cref="ICalendarPurge"/> object that has been authenticated against Google Services.</returns>
        /// <exception cref="Google.GData.Client.InvalidCredentialsException"></exception>
        public static ICalendarPurge Create( ICalendarCredentials credentials )
        {
            var service = new CalendarServiceAdapter( "GooCalPurge" )
            {
                Credentials = new GDataCredentials( credentials.UserName, credentials.Password )
            };

            Validate( credentials, service );

            var purge = new CalendarPurge( service, credentials.CalendarUrl );

            return purge;
        }
 public void TestInit()
 {
     _service = new Mock<IService>( MockBehavior.Strict );
     _calendarService = new Mock<IGoogleCalendarService>( MockBehavior.Strict );
     _calendarPurge = new CalendarPurge( _calendarService.Object, string.Empty );
 }