Refactoring: Added interfaces, custom exceptions, UserManager unit tests, dependency injection/inversion; Regex match search by date, keywords
This commit is contained in:
@@ -5,7 +5,7 @@ using System.Text;
|
||||
|
||||
namespace Models
|
||||
{
|
||||
public class Announcement : GenericMessage, IVotable
|
||||
public class Announcement : GenericMessage
|
||||
{
|
||||
public Announcement(int id, User author, string description, string title, DateTime publishDate, bool isImportant, bool isSticky) : base(id, author, description, title, publishDate)
|
||||
{
|
||||
@@ -31,16 +31,6 @@ namespace Models
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public void DownVote()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void UpVote()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Title} ({PublishDate.ToString("g")} - {Author.Name})";
|
||||
|
Reference in New Issue
Block a user