Example #1
0
        public void ExecuteSumTaskTimeTest()
        {
            string dbfile = "taskaludb21.sqlite";
            string path   = Path.GetTempPath() + "\\" + dbfile;

            TouchTestDB(dbfile);
            InsertTableTaskList(dbfile, "hoge", 0); // tasklist id = 1

            SQLiteClass.InsertOrUpdateTaskTime(
                path, false, 1,
                new DateTime(2019, 2, 1, 0, 0, 0, DateTimeKind.Utc),
                new DateTime(2019, 2, 1, 16, 0, 0, DateTimeKind.Utc));

            TimeSpan result = SQLiteClass.ExecuteSumTaskTime(path, 1);

            Debug.Assert(TimeSpan.Compare(result, new TimeSpan(16, 0, 0)) == 0);
        }