using System.Collections.Generic;
public static IEnumerable<Book> CreateBooks()
List<Book> books = new List<Book>
new Book("The Great Gatsby", 10.99m, new DateTime(1925, 4, 10), "Fiction"),
new Book("To Kill a Mockingbird", 12.50m, new DateTime(1960, 7, 11), "Fiction"),
new Book("1984", 9.99m, new DateTime(1949, 6, 8), "Dystopian"),
new Book("The Catcher in the Rye", 11.25m, new DateTime(1951, 7, 16), "Fiction"),
new Book("Pride and Prejudice", 8.75m, new DateTime(1813, 1, 28), "Romance")
public static void Main()
public record Book(string Name, decimal Price, DateTime Created, string Genre);
public void ConvertToIntNegative()
bool parseResult = int.TryParse(userInput, out actual);
Assert.True(parseResult);
Assert.Equal(expected, actual);