Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# exam_147_2020
# exam_147_2020
Ениватов Александр Алексеевич
Анаграммы:
Даны пары слов, определите сколько букв следует заменить в слове чтобы сделать его анаграммой, если это возможно
пример:
cat, cot – ответ 1 букву следует заменить
cat – coz – 2 – 2 буквы следует замениить.
51 changes: 51 additions & 0 deletions exam2.Tests/UnitTest1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
using System;
using Xunit;
using Anagrams;

namespace Anagrams.Tests
{
public class AnagramsTests
{
[Fact]
public void WordsCatAndCot()
{
Assert.Equal("Следует заменить 1 букв(-ы)" ,Program.Anagrams("cat", "cot"));
}

[Fact]
public void WordsAcceptAndExcept()
{
Assert.Equal("Следует заменить 2 букв(-ы)" ,Program.Anagrams("accept", "except"));
}

[Fact]
public void WordsAffectAndEffect()
{
Assert.Equal("Данные слова уже являются анаграммами" ,Program.Anagrams("affect", "effect"));
}

[Fact]
public void WordsDeerAndDeep()
{
Assert.Equal("Следует заменить 1 букв(-ы)" ,Program.Anagrams("deer", "deep"));
}

[Fact]
public void WordsMrahAndHarm()
{
Assert.Equal("Следует заменить 1 букв(-ы)" ,Program.Anagrams("principle", "principal"));
}

[Fact]
public void WordsCurrentAndCurrant()
{
Assert.Equal("Следует заменить 1 букв(-ы)" ,Program.Anagrams("current", "currant"));
}

[Fact]
public void WordsAgarAndTime()
{
Assert.Equal("Следует заменить 4 букв(-ы)" ,Program.Anagrams("agar", "time"));
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading