diff --git a/VCinema.sln b/VCinema.sln index 635eaf3..064b56a 100644 --- a/VCinema.sln +++ b/VCinema.sln @@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VCinemaApi", "VCinema\VCinemaApi.csproj", "{465DE7C9-B246-4F97-BC9B-7004AE0C7D2E}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VCinemaApiTests", "VCinemaApiTests\VCinemaApiTests.csproj", "{EC67DA15-0391-455D-8CCA-F6D12C07B2E0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -13,5 +15,9 @@ Global {465DE7C9-B246-4F97-BC9B-7004AE0C7D2E}.Debug|Any CPU.Build.0 = Debug|Any CPU {465DE7C9-B246-4F97-BC9B-7004AE0C7D2E}.Release|Any CPU.ActiveCfg = Release|Any CPU {465DE7C9-B246-4F97-BC9B-7004AE0C7D2E}.Release|Any CPU.Build.0 = Release|Any CPU + {EC67DA15-0391-455D-8CCA-F6D12C07B2E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC67DA15-0391-455D-8CCA-F6D12C07B2E0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC67DA15-0391-455D-8CCA-F6D12C07B2E0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC67DA15-0391-455D-8CCA-F6D12C07B2E0}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/VCinema/Controllers/ScreensController.cs b/VCinema/Controllers/ScreensController.cs index 7f16c54..0a6cc32 100644 --- a/VCinema/Controllers/ScreensController.cs +++ b/VCinema/Controllers/ScreensController.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using Microsoft.AspNetCore.Mvc; namespace VCinemaApi.Controllers @@ -7,31 +6,5 @@ namespace VCinemaApi.Controllers [ApiController] public class ScreensController : ControllerBase { - [HttpGet] - public IEnumerable Get() - { - return new string[] { "value1", "value2" }; - } - - [HttpGet("{id}")] - public string Get(int id) - { - return "value"; - } - - [HttpPost] - public void Post([FromBody] string value) - { - } - - [HttpPut("{id}")] - public void Put(int id, [FromBody] string value) - { - } - - [HttpDelete("{id}")] - public void Delete(int id) - { - } } -} +} \ No newline at end of file diff --git a/VCinema/Controllers/WatchersController.cs b/VCinema/Controllers/WatchersController.cs deleted file mode 100644 index ffda98a..0000000 --- a/VCinema/Controllers/WatchersController.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Collections.Generic; -using Microsoft.AspNetCore.Mvc; - -namespace VCinemaApi.Controllers -{ - [Route("api/watchers")] - [ApiController] - public class WatchersController : ControllerBase - { - [HttpGet] - public IEnumerable Get() - { - return new string[] { "value1", "value2" }; - } - - [HttpGet("{id}")] - public string Get(int id) - { - return "value"; - } - - [HttpPost] - public void Post([FromBody] string value) - { - } - - [HttpPut("{id}")] - public void Put(int id, [FromBody] string value) - { - } - - [HttpDelete("{id}")] - public void Delete(int id) - { - } - } -} diff --git a/VCinema/Data/IScreenRepository.cs b/VCinema/Data/IScreenRepository.cs new file mode 100644 index 0000000..6d53282 --- /dev/null +++ b/VCinema/Data/IScreenRepository.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using VCinemaApi.Models; + +namespace VCinemaApi.Data +{ + public interface IScreenRepository + { + public bool SaveChanges(); + + public IEnumerable GetScreens(); + public Screen GetScreenById(int id); + public void CreateScreen(Screen screen); + public void UpdateScreen(Screen screen); + public void SetPlayingById(int id, bool playing); + public void SetPositionById(int id, double position); + public bool GetPlayingById(int id); + public double GetPositionById(int id); + public double GetCurrentPositionById(int id); + } +} diff --git a/VCinema/Data/MockScreenRepository.cs b/VCinema/Data/MockScreenRepository.cs new file mode 100644 index 0000000..9cbde21 --- /dev/null +++ b/VCinema/Data/MockScreenRepository.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using VCinemaApi.Models; + +namespace VCinemaApi.Data +{ + public class MockScreenRepository : IScreenRepository + { + private static List _screens = new List + { + new Screen + { + Id = 0, + Name = "Kirby's Screen", + Source = "https://vcinema.b-cdn.net/Shrek.mp4", + Playing = true, + Position = 1337.0, + LastModified = new DateTime(2020, 03, 11, 17, 30, 00) + }, + new Screen + { + Id = 1, + Name = "Jack's Screen", + Source = "https://vcinema.b-cdn.net/The%20Fanatic.mp4", + Playing = true, + Position = 69420.00, + LastModified = new DateTime(2020, 03, 20, 19, 31, 04) + } + }; + + public void CreateScreen(Screen screen) + { + _screens.Add(screen); + } + + public void UpdateScreen(Screen newScreen) + { + var screen = GetScreenById(newScreen.Id); + screen.Name = newScreen.Name; + screen.Source = newScreen.Source; + screen.Playing = newScreen.Playing; + screen.Position = newScreen.Position; + screen.LastModified = DateTime.UtcNow; + } + + public IEnumerable GetScreens() + { + return _screens; + } + + public Screen GetScreenById(int id) + { + return _screens.Find(screen => screen.Id == id); + } + + public void SetPlayingById(int id, bool playing) + { + var screen = GetScreenById(id); + screen.Playing = playing; + } + + public bool GetPlayingById(int id) + { + var screen = GetScreenById(id); + return screen.Playing; + } + + public void SetPositionById(int id, double position) + { + var screen = GetScreenById(id); + screen.Position = position; + } + + public double GetPositionById(int id) + { + var screen = GetScreenById(id); + return screen.Position; + } + + public double GetCurrentPositionById(int id) + { + var screen = GetScreenById(id); + var elapsed = DateTime.UtcNow - screen.LastModified; + return elapsed.TotalSeconds + screen.Position; + } + + public bool SaveChanges() + { + return true; + } + } +} \ No newline at end of file diff --git a/VCinema/Data/ScreenRepository.cs b/VCinema/Data/ScreenRepository.cs new file mode 100644 index 0000000..d47f68a --- /dev/null +++ b/VCinema/Data/ScreenRepository.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using VCinemaApi.Models; + +namespace VCinemaApi.Data +{ + public class ScreenRepository : IScreenRepository + { + private VCinemaContext _context; + + public ScreenRepository(VCinemaContext context) + { + _context = context; + } + + public void CreateScreen(Screen screen) + { + _context.Screens.Add(screen); + } + + public void UpdateScreen(Screen newScreen) + { + var screen = GetScreenById(newScreen.Id); + screen.Name = newScreen.Name; + screen.Source = newScreen.Source; + screen.Playing = newScreen.Playing; + screen.Position = newScreen.Position; + screen.LastModified = DateTime.UtcNow; + } + + public IEnumerable GetScreens() + { + return _context.Screens; + } + + public Screen GetScreenById(int id) + { + return _context.Screens.Find(id); + } + + public void SetPlayingById(int id, bool playing) + { + var screen = GetScreenById(id); + screen.Playing = playing; + } + + public bool GetPlayingById(int id) + { + var screen = GetScreenById(id); + return screen.Playing; + } + + public void SetPositionById(int id, double position) + { + var screen = GetScreenById(id); + screen.Position = position; + } + + public double GetPositionById(int id) + { + var screen = GetScreenById(id); + return screen.Position; + } + + public double GetCurrentPositionById(int id) + { + var screen = GetScreenById(id); + var elapsed = DateTime.UtcNow - screen.LastModified; + return elapsed.TotalSeconds + screen.Position; + } + + public bool SaveChanges() + { + return (_context.SaveChanges() >= 0); + } + } +} diff --git a/VCinema/Models/VCinemaContext.cs b/VCinema/Data/VCinemaContext.cs similarity index 57% rename from VCinema/Models/VCinemaContext.cs rename to VCinema/Data/VCinemaContext.cs index e6665fa..8c26ecb 100644 --- a/VCinema/Models/VCinemaContext.cs +++ b/VCinema/Data/VCinemaContext.cs @@ -1,13 +1,16 @@ -using Microsoft.EntityFrameworkCore; -namespace VCinemaApi.Models +using System; +using Microsoft.EntityFrameworkCore; +using VCinemaApi.Models; + +namespace VCinemaApi.Data { public class VCinemaContext : DbContext { - public VCinemaContext(DbContextOptions options): base(options) + public VCinemaContext(DbContextOptions options) : base(options) { + } - public DbSet Watchers { get; set; } public DbSet Screens { get; set; } } } diff --git a/VCinema/Dtos/ScreenReadDto.cs b/VCinema/Dtos/ScreenReadDto.cs new file mode 100644 index 0000000..ff50525 --- /dev/null +++ b/VCinema/Dtos/ScreenReadDto.cs @@ -0,0 +1,23 @@ +using System; +using VCinemaApi.Models; + +namespace VCinemaApi.Dtos +{ + public class ScreenReadDto + { + public ScreenReadDto(Screen screen) + { + Id = screen.Id; + Name = screen.Name; + Source = screen.Source; + Playing = screen.Playing; + Position = screen.Position; + } + + public readonly int Id; + public readonly string Name; + public readonly string Source; + public readonly bool Playing; + public readonly double Position; + } +} \ No newline at end of file diff --git a/VCinema/Hubs/IVCinemaHub.cs b/VCinema/Hubs/IVCinemaHub.cs deleted file mode 100644 index c5860a9..0000000 --- a/VCinema/Hubs/IVCinemaHub.cs +++ /dev/null @@ -1,15 +0,0 @@ -using VCinemaApi.Models; - -namespace VCinemaApi.Hubs -{ - public interface IVCinemaHub - { - public Screen CreateScreen(string name, string source); - public void DeleteScreen(int screenId); - public Screen WatchScreen(int screenId); - public void LeaveScreen(); - public Watcher SetWatcherName(string name); - public Screen SetPlayState(bool playing); - public Screen SetPlayOffset(int playOffset); - } -} diff --git a/VCinema/Hubs/VCinemaHub.cs b/VCinema/Hubs/VCinemaHub.cs index 81e55f2..1c8d45e 100644 --- a/VCinema/Hubs/VCinemaHub.cs +++ b/VCinema/Hubs/VCinemaHub.cs @@ -1,69 +1,9 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Microsoft.AspNetCore.SignalR; -using VCinemaApi.Models; -using VCinemaApi.Repositories; +using Microsoft.AspNetCore.SignalR; namespace VCinemaApi.Hubs { - public class VCinemaHub : Hub + public class VCinemaHub : Hub { - private readonly IScreenRepository _screenRepository; - private readonly IWatcherRepository _watcherRepository; - - public VCinemaHub(IScreenRepository screenRepository, IWatcherRepository watcherRepository) - { - _screenRepository = screenRepository; - _watcherRepository = watcherRepository; - } - - public override async Task OnConnectedAsync() - { - _watcherRepository.AddWatcher(Context.ConnectionId); - await base.OnConnectedAsync(); - } - - public override async Task OnDisconnectedAsync(Exception exception) - { - _watcherRepository.DeleteWatcherByConnectionId(Context.ConnectionId); - await base.OnDisconnectedAsync(exception); - } - - public Screen CreateScreen(string name, string source) - { - return _screenRepository.AddScreen(name, source); - } - - public void DeleteScreen(int screenId) - { - _screenRepository.DeleteScreenById(screenId); - } - - public Screen WatchScreen(int screenId) - { - var watcher = _watcherRepository.SetWatcherScreenByConnectionId(Context.ConnectionId, screenId); - return watcher.Screen; - } - - public void LeaveScreen() - { - _watcherRepository.UnsetWatcherScreenByConnectionId(Context.ConnectionId); - } - - public Watcher SetWatcherName(string name) - { - return _watcherRepository.SetWatcherNameByConnectionId(Context.ConnectionId, name); - } - - public Screen SetPlayState(bool playing) - { - throw new NotImplementedException(); - } - - public Screen SetPlayOffset(int playOffset) - { - throw new NotImplementedException(); - } + } } diff --git a/VCinema/Models/Screen.cs b/VCinema/Models/Screen.cs index 891a84e..317fe83 100644 --- a/VCinema/Models/Screen.cs +++ b/VCinema/Models/Screen.cs @@ -1,23 +1,32 @@ using System; -using System.Collections.Generic; +using System.ComponentModel; using System.ComponentModel.DataAnnotations; +using System.Text.Json.Serialization; namespace VCinemaApi.Models { public class Screen { [Key] - public int ScreenId { get; set; } + public int Id { get; set; } [Required] + [MaxLength(100)] public string Name { get; set; } + [Required] + [MaxLength(250)] public string Source { get; set; } - public DateTime PlayStateUpdated { get; set; } - public bool PlayState { get; set; } - public int PlayOffset { get; set; } + [Required] + [DefaultValue(false)] + public bool Playing { get; set; } - public ICollection Watchers { get; set; } + [Required] + [DefaultValue(0.0)] + public double Position { get; set; } + + [JsonIgnore] + public DateTime LastModified { get; set; } } -} \ No newline at end of file +} diff --git a/VCinema/Models/Watcher.cs b/VCinema/Models/Watcher.cs deleted file mode 100644 index 4b6cc02..0000000 --- a/VCinema/Models/Watcher.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace VCinemaApi.Models -{ - public class Watcher - { - [Key] - public int WatcherId { get; set; } - - [Required] - public string ConnectionId { get; set; } - - public string Name { get; set; } - public Screen Screen { get; set; } - } -} diff --git a/VCinema/Repositories/IScreenRepository.cs b/VCinema/Repositories/IScreenRepository.cs deleted file mode 100644 index 21a5136..0000000 --- a/VCinema/Repositories/IScreenRepository.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections.Generic; -using System.Threading.Tasks; -using VCinemaApi.Models; - -namespace VCinemaApi.Repositories -{ - public interface IScreenRepository - { - IEnumerable GetScreens(); - Screen GetScreenById(int id); - Screen AddScreen(string name, string source); - void DeleteScreenById(int id); - } -} diff --git a/VCinema/Repositories/IWatcherRepository.cs b/VCinema/Repositories/IWatcherRepository.cs deleted file mode 100644 index 06db2bc..0000000 --- a/VCinema/Repositories/IWatcherRepository.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; -using System.Threading.Tasks; -using VCinemaApi.Models; - -namespace VCinemaApi.Repositories -{ - public interface IWatcherRepository - { - IEnumerable GetWatchersByScreenId(int screenId); - Watcher GetWatcherByConnectionId(string connectionId); - Watcher AddWatcher(string connectionId); - Watcher SetWatcherNameByConnectionId(string connectionId, string name); - Watcher SetWatcherScreenByConnectionId(string connectionId, int screenId); - Watcher UnsetWatcherScreenByConnectionId(string connectionId); - void DeleteWatcherByConnectionId(string connectionId); - } -} diff --git a/VCinema/Repositories/MockScreenRepository.cs b/VCinema/Repositories/MockScreenRepository.cs deleted file mode 100644 index 8c36b4b..0000000 --- a/VCinema/Repositories/MockScreenRepository.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using VCinemaApi.Models; - -namespace VCinemaApi.Repositories -{ - public class MockScreenRepository : IScreenRepository - { - public IEnumerable GetScreens() - { - return new List - { - new Screen { - ScreenId = 1, - Name = "Kirby's screen", - Source = "https://vcinema.b-cdn.net/shrek.mp4", - PlayStateUpdated = new DateTime(2020, 9, 21, 21, 02, 57), - PlayState = true, - PlayOffset = 1337 - }, - new Screen { - ScreenId = 2, - Name = "Sid's screen", - Source = "https://vcinema.b-cdn.net/weeb.mp4", - PlayStateUpdated = new DateTime(2020, 9, 21, 21, 03, 22), - PlayState = true, - PlayOffset = 69 - } - }; - } - - public Screen GetScreenById(int id) - { - return new Screen - { - ScreenId = id, - Name = "Kirby's screen", - Source = "https://vcinema.b-cdn.net/shrek.mp4", - PlayStateUpdated = DateTime.UtcNow, - PlayState = true, - PlayOffset = 1337 - }; - } - - public Screen AddScreen(string name, string source) - { - return new Screen - { - ScreenId = 1, - Name = name, - Source = source, - PlayStateUpdated = DateTime.UtcNow, - PlayState = true, - PlayOffset = 1337 - }; - } - - public void DeleteScreenById(int screenId) - { - - } - } -} diff --git a/VCinema/Repositories/MockWatcherRepository.cs b/VCinema/Repositories/MockWatcherRepository.cs deleted file mode 100644 index 8d18840..0000000 --- a/VCinema/Repositories/MockWatcherRepository.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using VCinemaApi.Models; - -namespace VCinemaApi.Repositories -{ - public class MockWatcherRepository : IWatcherRepository - { - public IEnumerable GetWatchersByScreenId(int screenId) - { - var screen = new Screen - { - ScreenId = 1, - Name = "Kirby's screen", - Source = "https://vcinema.b-cdn.net/shrek.mp4", - PlayStateUpdated = new DateTime(2020, 9, 21, 21, 02, 57), - PlayState = true, - PlayOffset = 1337 - }; - - return new List - { - new Watcher - { - WatcherId = 1, - ConnectionId = "dJSbEc73n6YjGIhj-SZz1Q", - Name = "Kirby", - Screen = screen - }, - new Watcher - { - WatcherId = 2, - ConnectionId = "rNA9Jn7ytYPzQfFJ-j3NBa", - Name = "Jack", - Screen = screen - } - }; - } - - public Watcher GetWatcherByConnectionId(string connectionId) - { - return new Watcher - { - WatcherId = 1, - ConnectionId = "dJSbEc73n6YjGIhj-SZz1Q", - Name = "Kirby", - Screen = null - }; - } - - public Watcher AddWatcher(string connectionId) - { - return new Watcher - { - WatcherId = 1, - ConnectionId = connectionId, - Name = "Kirby", - Screen = null - }; - } - - public Watcher SetWatcherNameByConnectionId(string connectionId, string name) - { - return new Watcher - { - WatcherId = 1, - ConnectionId = connectionId, - Name = "Kirby", - Screen = null - }; - } - - public Watcher SetWatcherScreenByConnectionId(string connectionId, int screenId) - { - return new Watcher - { - WatcherId = 1, - ConnectionId = connectionId, - Name = "Kirby", - Screen = new Screen - { - ScreenId = screenId, - Name = "Kirby's screen", - Source = "https://vcinema.b-cdn.net/shrek.mp4", - PlayStateUpdated = new DateTime(2020, 9, 21, 21, 02, 57), - PlayState = true, - PlayOffset = 1337 - } - }; - } - - public Watcher UnsetWatcherScreenByConnectionId(string connectionId) - { - return new Watcher - { - WatcherId = 1, - ConnectionId = connectionId, - Name = "Kirby", - Screen = null - }; - } - - public void DeleteWatcherByConnectionId(string connectionId) - { - - } - } -} diff --git a/VCinema/Repositories/ScreenRepository.cs b/VCinema/Repositories/ScreenRepository.cs deleted file mode 100644 index d96e95d..0000000 --- a/VCinema/Repositories/ScreenRepository.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using VCinemaApi.Models; - -namespace VCinemaApi.Repositories -{ - public class ScreenRepository : IScreenRepository - { - private readonly VCinemaContext _context; - - public ScreenRepository(VCinemaContext context) - { - _context = context; - } - - public IEnumerable GetScreens() - { - return _context.Screens.ToList(); - } - - public Screen GetScreenById(int id) - { - return _context.Screens.Find(id); - } - - public Screen AddScreen(string name, string source) - { - var screen = new Screen - { - Name = name, - Source = source - }; - - _context.Screens.Add(screen); - _context.SaveChanges(); - - return screen; - } - - public void DeleteScreenById(int screenId) - { - var screen = GetScreenById(screenId); - _context.Screens.Remove(screen); - _context.SaveChanges(); - } - } -} diff --git a/VCinema/Repositories/WatcherRepository.cs b/VCinema/Repositories/WatcherRepository.cs deleted file mode 100644 index 8ae298a..0000000 --- a/VCinema/Repositories/WatcherRepository.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using VCinemaApi.Models; - -namespace VCinemaApi.Repositories -{ - public class WatcherRepository : IWatcherRepository - { - private readonly VCinemaContext _context; - - public WatcherRepository(VCinemaContext context) - { - _context = context; - } - - public IEnumerable GetWatchersByScreenId(int screenId) - { - return _context.Watchers.Where(watcher => watcher.Screen.ScreenId == screenId); - } - - public Watcher GetWatcherByConnectionId(string connectionId) - { - return _context.Watchers.SingleOrDefault(watcher => watcher.ConnectionId == connectionId); - } - - public Watcher AddWatcher(string connectionId) - { - var watcher = new Watcher() - { - ConnectionId = connectionId, - }; - - _context.Watchers.Add(watcher); - _context.SaveChanges(); - - return watcher; - } - - public Watcher SetWatcherNameByConnectionId(string connectionId, string name) - { - var watcher = GetWatcherByConnectionId(connectionId); - - watcher.Name = name; - _context.SaveChanges(); - - return watcher; - } - - public Watcher SetWatcherScreenByConnectionId(string connectionId, int screenId) - { - var watcher = GetWatcherByConnectionId(connectionId); - var screen = _context.Screens.Find(screenId); - - watcher.Screen = screen; - _context.SaveChanges(); - - return watcher; - } - - public Watcher UnsetWatcherScreenByConnectionId(string connectionId) - { - var watcher = GetWatcherByConnectionId(connectionId); - - watcher.Screen = null; - _context.SaveChanges(); - - return watcher; - } - - public void DeleteWatcherByConnectionId(string connectionId) - { - var watcher = GetWatcherByConnectionId(connectionId); - _context.Watchers.Remove(watcher); - _context.SaveChanges(); - } - } -} diff --git a/VCinema/Startup.cs b/VCinema/Startup.cs index 4185ef0..712db64 100644 --- a/VCinema/Startup.cs +++ b/VCinema/Startup.cs @@ -4,9 +4,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; +using VCinemaApi.Data; using VCinemaApi.Hubs; -using VCinemaApi.Models; -using VCinemaApi.Repositories; namespace VCinemaApi { @@ -22,9 +21,8 @@ namespace VCinemaApi // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - services.AddDbContext(options => options.UseInMemoryDatabase("VCinema")); - services.AddScoped(); - services.AddScoped(); + services.AddDbContext(options => options.UseInMemoryDatabase(databaseName: "VCinema")); + services.AddScoped(); services.AddControllers(); services.AddSignalR(); } diff --git a/VCinema/VCinemaApi.csproj b/VCinema/VCinemaApi.csproj index 1d5e367..cad8c68 100644 --- a/VCinema/VCinemaApi.csproj +++ b/VCinema/VCinemaApi.csproj @@ -11,8 +11,9 @@ - + + diff --git a/VCinemaApiTests/UnitTest1.cs b/VCinemaApiTests/UnitTest1.cs new file mode 100644 index 0000000..7ea7a0d --- /dev/null +++ b/VCinemaApiTests/UnitTest1.cs @@ -0,0 +1,13 @@ +using Xunit; + +namespace VCinemaApiTests +{ + public class UnitTest1 + { + [Fact] + public void Test1() + { + + } + } +} diff --git a/VCinemaApiTests/VCinemaApiTests.csproj b/VCinemaApiTests/VCinemaApiTests.csproj new file mode 100644 index 0000000..6b41575 --- /dev/null +++ b/VCinemaApiTests/VCinemaApiTests.csproj @@ -0,0 +1,16 @@ + + + + netcoreapp3.1 + + false + + + + + + + + + +