public void TestAddInvalidModel(object model) { // Arrange DefaultArrange(); var service = new DataWarehouse(logger.Object); // Act var addResult = service.TryAdd(model as IModel); // Assert Assert.False(addResult); }
public void TestParallelGetReportValid(int clientCount, int salesmanCount, int mostExpensiveSaleId, string worstSalesman, IEnumerable <object> models) { // Arrange DefaultArrange(); var service = new DataWarehouse(logger.Object); // Act Parallel.ForEach(models, (model) => { service.TryAdd(model as IModel); }); var report = service.GetReport(); // Assert Assert.Equal(clientCount, report.ClientCount); Assert.Equal(salesmanCount, report.SalesmanCount); Assert.Equal(mostExpensiveSaleId, report.MostExpensiveSaleId); Assert.Equal(worstSalesman, report.WorstSalesman); }