示例#1
0
        private void PopulateWithTestData()
        {
            controller.AddContact("*****@*****.**", "Jan Novák");
            controller.AddContact("*****@*****.**", "Pepa Novák");
            controller.AddContact("*****@*****.**", "Zbyněk Dlouhý");
            controller.AddContact("*****@*****.**", "Josef Malý");
            controller.AddContact("*****@*****.**", "Ladislav Polívka");
            controller.AddContact("*****@*****.**", "Ondřej Červinka");
            controller.AddContact("*****@*****.**", "Eva Sladká");
            controller.AddContact("*****@*****.**", "Tereza Krátká");
            controller.AddContact("*****@*****.**", "Jana Ostrá");

            var email = new Email
            {
                FromAddress = "*****@*****.**",
                ToAddresses = new List <string> {
                    "*****@*****.**"
                },
                Subject = "lampa",
                Body    = "Ahoj, pujc mi lampu. Honza",
                Date    = DateTime.Now.AddDays(-1)
            };

            controller.ReceivedEmails.Add(email);

            email = new Email
            {
                FromAddress = "*****@*****.**",
                ToAddresses = new List <string> {
                    "*****@*****.**"
                },
                Subject = "stul",
                Body    = "Potrebuju opravit stul.",
                Date    = DateTime.Now.AddDays(-2)
            };
            controller.ReceivedEmails.Add(email);

            email = new Email
            {
                FromAddress = "*****@*****.**",
                ToAddresses = new List <string> {
                    "*****@*****.**"
                },
                Subject = "pozdrav",
                Body    = "Ahoj, jak se mas? Janicka",
                Date    = DateTime.Now.AddDays(-4)
            };
            controller.ReceivedEmails.Add(email);

            email = new Email
            {
                FromAddress = "*****@*****.**",
                ToAddresses = new List <string> {
                    "*****@*****.**"
                },
                Subject = "prochazka",
                Body    = "Ahoj, vyrazime zitra ven? Terka",
                Date    = DateTime.Now.AddDays(-8)
            };
            controller.ReceivedEmails.Add(email);

            email = new Email
            {
                FromAddress = "*****@*****.**",
                ToAddresses = new List <string> {
                    "*****@*****.**"
                },
                Subject = "prochazka",
                Body    = "Ahoj, vyrazime zitra ven? Terka",
                Date    = DateTime.Now.AddDays(-16)
            };
            controller.ReceivedEmails.Add(email);

            email = new Email
            {
                FromAddress = "*****@*****.**",
                ToAddresses = new List <string> {
                    "*****@*****.**"
                },
                Subject = "zidle",
                Body    = "Mam rozbitou zidli, nemuzu na ni sedet :(",
                Date    = DateTime.Now.AddDays(-32)
            };
            controller.ReceivedEmails.Add(email);

            email = new Email
            {
                FromAddress = "*****@*****.**",
                ToAddresses = new List <string> {
                    "*****@*****.**"
                },
                Subject = "re: prochazka",
                Body    = "Ahoj, jasne.",
                Date    = DateTime.Now.AddDays(-7)
            };
            controller.SentEmails.Add(email);
        }