diff --git a/Models/Ticket.cs b/Models/Ticket.cs index 5b28ded..0063be7 100644 --- a/Models/Ticket.cs +++ b/Models/Ticket.cs @@ -47,7 +47,7 @@ namespace TicketManager.Models { return Project.Assignments.Select(a => a.User).ToList(); } - public void GetLastUpdateTime() { throw new NotImplementedException("Not Implemented"); } + public void GetLastUpdateTime() { throw new NotImplementedException("Not Implemented Yet."); } public void Close() { Status = Status.Done; diff --git a/Tests/TicketManager.Tests/UnitTests/ControllersTests/ControllerTests.cs b/Tests/TicketManager.Tests/UnitTests/ControllersTests/ControllerTests.cs deleted file mode 100644 index 7525335..0000000 --- a/Tests/TicketManager.Tests/UnitTests/ControllersTests/ControllerTests.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Threading.Tasks; -using TicketManager.Data; -using Microsoft.Data.Sqlite; -using Microsoft.EntityFrameworkCore; - -namespace TicketManager._ -{ - public class ControllersTests - { - - public static void Wrapper( - Func, Task> Test, - Action> SeedDb) - { - // Create inMemory Test Database - var connection = new SqliteConnection("DataSource=:memory:"); - connection.Open(); - - try - { - var options = new DbContextOptionsBuilder() - .UseSqlite(connection) - .Options; - - // creates DB schema - using (var context = new AppDbContext(options)) - { - context.Database.EnsureCreated(); - } - - // Seed DB usng one context instance - SeedDb(options); - - // use another context instance to run the test - Test(options); - } - finally - { - connection.Close(); - } - } - } -} \ No newline at end of file diff --git a/Tests/TicketManager.Tests/UnitTests/ControllersTests/SeedDb.cs b/Tests/TicketManager.Tests/UnitTests/ControllersTests/SeedDb.cs deleted file mode 100644 index 1118c8a..0000000 --- a/Tests/TicketManager.Tests/UnitTests/ControllersTests/SeedDb.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using TicketManager.Data; -using TicketManager.Models; -using Microsoft.EntityFrameworkCore; - -namespace TicketManager._ -{ - public class SeedDb - { - public static void Projects(DbContextOptions options) - // Seed DB usng one context instance - { - using (var context = new AppDbContext(options)) - { - context.Projects.AddRange( - new Project() - { - Id = 1, - Title = "Secret Project", - Description = "Shht Don't Ask don't tell", - PlannedEnding = new DateTime(2021, 7, 21) - }, - new Project() - { - Id = 2, - Title = "Public Project", - Description = "It's quite obvious, isn't it?!", - PlannedEnding = new DateTime(2036, 6, 16) - }); - context.SaveChanges(); - } - } - } -} \ No newline at end of file