Пример #1
0
        public void TicketDateTime()
        {
            SqlConnection db = new SqlConnection("Data Source=..\\SQLEXPRESS;Initial Catalog=SimpleBugs;Integrated Security=True");

            SimpleBugContext bugContext = new SimpleBugContext(db);

            BugTicket ticket = new BugTicket(bugContext);

            StringAssert.IsMatch(DateTime.Now.ToString(), ticket.DateInformation.ToString());
        }
Пример #2
0
        public void TicketUserName()
        {
            //var configConnection = ConfigurationManager
            //    .ConnectionStrings["SimpleBugs"]
            //    .ConnectionString;
            SqlConnection db = new SqlConnection("Data Source=..\\SQLEXPRESS;Initial Catalog=SimpleBugs;Integrated Security=True");

            SimpleBugContext bugContext = new SimpleBugContext(db);

            BugTicket ticket = new BugTicket(bugContext);

            StringAssert.IsMatch(System.Environment.UserName.ToString(), ticket.UserName.ToString());
        }
Пример #3
0
 /// <summary>
 ///
 /// </summary>
 public BugTicket(SimpleBugContext contextBug)
 {
     this.UserName        = Environment.UserName.ToString();
     this.DateInformation = DateTime.Now;
 }