Documentation & code cleanup

This commit is contained in:
Dimitar Byalkov
2023-06-09 11:51:42 +02:00
parent 0ac97bd31a
commit 1832e111e3
61 changed files with 140 additions and 325 deletions

View File

@@ -1,10 +1,5 @@
using Logic;
using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tests.Mocks;
namespace Tests

View File

@@ -1,13 +1,6 @@
using Logic;
using Models;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace Tests.Mocks
{
@@ -16,7 +9,7 @@ namespace Tests.Mocks
private List<Announcement> announcements;
private int currentId;
public AnnouncementRepositoryFake()
public AnnouncementRepositoryFake()
{
announcements = new List<Announcement>();
currentId = 1;

View File

@@ -1,10 +1,5 @@
using Models;
using Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Logic;
using Models;
namespace Tests.Mocks
{
@@ -12,7 +7,7 @@ namespace Tests.Mocks
{
private List<User> users;
private int currentId;
public UserRepositoryFake()
public UserRepositoryFake()
{
users = new List<User>();
currentId = 1;

View File

@@ -1,4 +1,3 @@
using BCrypt.Net;
using Logic;
using Models;
using Tests.Mocks;
@@ -26,7 +25,7 @@ namespace Tests
// Assert
Assert.IsNull(result);
}
[TestMethod]
[ExpectedException(typeof(ArgumentException))]
public void AuthenticatedUserNullPasswordTest()
@@ -133,7 +132,7 @@ namespace Tests
// Assert
// ArgumentException expected
}
[TestMethod]
public void DisableUserTest()
{
@@ -148,6 +147,6 @@ namespace Tests
Assert.AreEqual(user.Name, $"Deleted User {user.ID}");
Assert.AreEqual(user.Password, "0");
}
}
}