Skip to content

Commit

Permalink
fix: now using relative paths instead of conventional paths
Browse files Browse the repository at this point in the history
  • Loading branch information
BMV989 committed Dec 26, 2024
1 parent a462b92 commit 69a8c1f
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 7 deletions.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions TagCloud/WordsFilter/BoringWordsFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ namespace TagCloud.WordsFilter;
public class BoringWordsFilter : IWordsFilter
{
private readonly WordList wordList = WordList.CreateFromFiles(
"../../../../TagCloud/WordsFilter/Dictionaries/EnUS.dic",
"../../../../TagCloud/WordsFilter/Dictionaries/EnUS.aff");
"Dictionaries/EnUS.dic",
"Dictionaries/EnUS.aff");

public List<string> ApplyFilter(List<string> words) =>
words.Where(w => !IsBoring(w)).ToList();
Expand Down
7 changes: 7 additions & 0 deletions TagCloudClient/TagCloudClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,11 @@
<PackageReference Include="CommandLineParser" Version="2.9.1" />
</ItemGroup>

<ItemGroup>
<ContentWithTargetPath Include="../Shared/**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>%(RecursiveDir)\%(Filename)%(Extension)</TargetPath>
</ContentWithTargetPath>
</ItemGroup>

</Project>
13 changes: 13 additions & 0 deletions TagCloudTests/TagCloudTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,17 @@
<ProjectReference Include="..\TagCloud\TagCloud.csproj" />
</ItemGroup>

<ItemGroup>
<ContentWithTargetPath Include="../Shared/**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>%(RecursiveDir)\%(Filename)%(Extension)</TargetPath>
</ContentWithTargetPath>
</ItemGroup>

<ItemGroup>
<None Update="WordsReader/Samples/*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
9 changes: 4 additions & 5 deletions TagCloudTests/WordsReader/WordsReadersTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ namespace TagCloudTests.WordsReader;
[TestFixture]
public class WordsReadersTest
{
private const string FileContent =
"Hello... Hello? Hello world!";
private const string FileContent = "Hello... Hello? Hello world!";

private static IEnumerable<TestCaseData> WordsReadersTestCases
{
get
{
yield return new TestCaseData(new WordFileReader("../../../WordsReader/Samples/text.docx"));
yield return new TestCaseData(new FileReader("../../../WordsReader/Samples/text.txt", Encoding.UTF8));
yield return new TestCaseData(new CsvFileReader("../../../WordsReader/Samples/text.csv", CultureInfo.InvariantCulture));
yield return new TestCaseData(new WordFileReader("WordsReader/Samples/text.docx"));
yield return new TestCaseData(new FileReader("WordsReader/Samples/text.txt", Encoding.UTF8));
yield return new TestCaseData(new CsvFileReader("WordsReader/Samples/text.csv", CultureInfo.InvariantCulture));
}
}

Expand Down

0 comments on commit 69a8c1f

Please sign in to comment.