public void ParsedToLines(string query, string[] lineArray) { // Arrange var expected = lineArray.ToList(); // Act var actual = ValidationAdminService.ParseQueryToLines(query); // Assert Assert.Equal(expected, actual); }
public FactsBase() { _packageKey = 42; _symbolPackageKey = 420; _package = new Package { Key = _packageKey }; _symbolPackage = new SymbolPackage() { Key = _symbolPackageKey }; _validationKey = new Guid("ae05c5f9-eb2a-415b-ae42-92829bf201a7"); _validation = new PackageValidation { Key = _validationKey }; _validationSetKey = 1001; _validationSetTrackingId = new Guid("490e8d72-967a-485f-a035-67d5bba0af9f"); _validationSet = new PackageValidationSet { Key = _validationSetKey, ValidationTrackingId = _validationSetTrackingId, PackageValidations = new[] { _validation }, }; _validation.PackageValidationSet = _validationSet; _validationSets = new Mock <IEntityRepository <PackageValidationSet> >(); _validations = new Mock <IEntityRepository <PackageValidation> >(); _packages = new Mock <IEntityRepository <Package> >(); _symbolPackages = new Mock <IEntityRepository <SymbolPackage> >(); _packages .Setup(x => x.GetAll()) .Returns(() => new[] { _package }.AsQueryable()); _symbolPackages .Setup(x => x.GetAll()) .Returns(() => new[] { _symbolPackage }.AsQueryable()); _validations .Setup(x => x.GetAll()) .Returns(() => new[] { _validation }.AsQueryable()); _validationSets .Setup(x => x.GetAll()) .Returns(() => new[] { _validationSet }.AsQueryable()); _target = new ValidationAdminService( _validationSets.Object, _validations.Object, _packages.Object, _symbolPackages.Object); }