public void AddNewEntity(string repositoryName) { XMLService service = new XMLService(repositoryName); bool operationResult = service.AddEntity(new Book() { Id = 365461, Title = "New Book", City = "Minsk", Annotation = "aaaaddhdhaaa", Authors = new List <string> { "Victor" }, Publisher = "EPAM", Description = "Book" }); Assert.AreEqual(operationResult, true); }
public void AddNewNullEntityExeption(string repositoryName, Type exception) { XMLService service = new XMLService(repositoryName); Assert.Throws(exception, () => service.AddEntity(null)); }