public void CanNotMatchIfStartingWithNSBName(string sagaName) { var nsbCollectionName = CollectionNamer.NameByNSBConvention(sagaName); var ravenCollectionName = CollectionNamer.NameByDefaultRavenConvention(sagaName); var collections = new List <string> { nsbCollectionName, ravenCollectionName }; string match; Assert.IsFalse(CollectionNameChecker.CheckForMatch(nsbCollectionName, collections, out match)); }
private static bool CheckForDuplicateSagaCollections(List <string> collectionNamesInIndex) { var found = false; foreach (var collectionName in collectionNamesInIndex) { if (KnownCollectionNames.Contains(collectionName)) { continue; } string match; if (!CollectionNameChecker.CheckForMatch(collectionName, collectionNamesInIndex, out match)) { continue; } found = true; Console.WriteLine($"Problem! Duplicate saga data collections found: {collectionName}/{match}."); } return(found); }