ObjectNotExistForException_GeneratesMessage_BookList_ForUserWith_UserData_DoesNotExist_When_BookListDescriptorIsNull() { const string email = "*****@*****.**"; var result = $"Book list for user with Email:{email} doesn't exist"; var exception = new ObjectNotExistForException <BookList, User>(null, new OnExceptionObjectDescriptor { ["Email"] = email }); Assert.Equal(result, exception.Message); }
ObjectNotExistForException_GeneratesMessage_BookListWith_BookListData_ForUser_DoesNotExist_When_UserDescriptorIsNull() { const int id = 2; var result = $"Book list with Id:{id.ToString()} for user doesn't exist"; var exception = new ObjectNotExistForException <BookList, User>(new OnExceptionObjectDescriptor { ["Id"] = id.ToString() }, null); Assert.Equal(result, exception.Message); }
ObjectNotExistForException_GeneratesMessage_BookListWith_ListData_ForUserWith_UserData_DoesNotExist() { const string username = "******"; const int listId = 1; var result = $"Book list with Id:{listId.ToString()} for user with Email:{username} doesn't exist"; var exception = new ObjectNotExistForException <BookList, User>(new OnExceptionObjectDescriptor { ["Id"] = listId.ToString() }, new OnExceptionObjectDescriptor { ["Email"] = username }); Assert.Equal(result, exception.Message); }