-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ОФ+УФ: Горячая клавиша F7 для выполнения всех тестов #156
ОФ: Утверждение "ПроверитьРавенствоФайлов" и "ПроверитьРавенствоФайловСУчетомПереданныхПараметровСравнения" с помощью СравнениеФайлов #148 тесты для этих утверждений
- Loading branch information
Showing
15 changed files
with
294 additions
and
137 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{1,17,"c9e69ba1-02d3-4130-84f6-2d18842e2419",440f118b-a6c1-42bf-a44a-09058079ef74,"c9e69ba1-02d3-4130-84f6-2d18842e2419.0",84e492d5-6142-4440-aa91-10d80ae0014e,"",ae2dfcce-4438-4df7-9d9b-571f65ecd6d1,"5719adc2-89f4-4925-a175-71797b810b75.0",7eff5eaf-5035-4b81-9117-ff10f9982f5c,"versions",ee028fc0-c581-493c-a7e5-85fb5918423f,"e54522b2-9d53-4951-8510-585b193e7360",d6703651-cce1-4b0f-b53a-4da0cbc5f34e,"5719adc2-89f4-4925-a175-71797b810b75",26d70b0e-4ea6-419b-ad93-cc6ad6853f99,"root",b8349883-80b5-471f-b666-3cc84dec7cfd,"a6c816ea-fd9e-48f9-82f1-549b68d76c06",687ea26d-43b3-4ef1-980d-1e42b5a271fd,"eb06628e-c9dd-41df-bac8-49528a8e463a.0",18994c7c-87a5-437f-94ca-9692a9d25254,"a6c816ea-fd9e-48f9-82f1-549b68d76c06.0",6b11bd90-002e-4036-8c9c-0cbc7408f7fe,"d8ff9744-3ec3-4889-ad02-3311a6fcc093",d9c846c1-9699-420f-812a-b332d41446e0,"version",d57aafdf-b86f-492b-98a6-34373a2da8dd,"5cf3a206-3db3-4464-b64b-1efd81585d1e.0",da2b20b1-9c55-43f0-ab5e-89e9ada26970,"d8ff9744-3ec3-4889-ad02-3311a6fcc093.0",37bc0691-ce9e-4105-8c24-ee89b94a785d,"copyinfo",decc5cc3-cc55-42ea-8f7d-747774bc3bba,"eb06628e-c9dd-41df-bac8-49528a8e463a",e6b12db3-562c-4802-9ad8-05963d96f6be} | ||
{1,17,"c9e69ba1-02d3-4130-84f6-2d18842e2419",440f118b-a6c1-42bf-a44a-09058079ef74,"c9e69ba1-02d3-4130-84f6-2d18842e2419.0",84e492d5-6142-4440-aa91-10d80ae0014e,"",05548068-6b39-4983-92c1-4895f7b553c7,"5719adc2-89f4-4925-a175-71797b810b75.0",69b607b8-09c0-45fa-8a72-52868e1a9889,"versions",00059d74-af40-48c7-a2c5-ee7da4356046,"e54522b2-9d53-4951-8510-585b193e7360",8db6d051-f9e8-4e4d-8dae-d13bccc1acb2,"5719adc2-89f4-4925-a175-71797b810b75",7d6b307d-c80f-4140-9da8-f3f199cd9fbb,"root",4c8ea41e-1992-43a9-9a99-8a7e87c5f311,"a6c816ea-fd9e-48f9-82f1-549b68d76c06",a444bfd2-b6b4-4766-a6b2-e84bcbeb343c,"eb06628e-c9dd-41df-bac8-49528a8e463a.0",18994c7c-87a5-437f-94ca-9692a9d25254,"a6c816ea-fd9e-48f9-82f1-549b68d76c06.0",4d1882e8-f014-4b0f-9445-6d054b8cfde8,"d8ff9744-3ec3-4889-ad02-3311a6fcc093",d9c846c1-9699-420f-812a-b332d41446e0,"version",8ceb3549-f491-496d-b3e6-99f09111b390,"5cf3a206-3db3-4464-b64b-1efd81585d1e.0",13f82b2b-226b-4ce2-8582-7cf0781e2d38,"d8ff9744-3ec3-4889-ad02-3311a6fcc093.0",37bc0691-ce9e-4105-8c24-ee89b94a785d,"copyinfo",6c363c55-efef-492f-bee4-3c8b30ad4822,"eb06628e-c9dd-41df-bac8-49528a8e463a",e6b12db3-562c-4802-9ad8-05963d96f6be} |
88 changes: 88 additions & 0 deletions
88
src/Тесты/selftests/ТестыУтверждения_ПроверитьРавенствоФайлов/ObjectModule.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
#Если ТолстыйКлиентОбычноеПриложение или ТолстыйКлиентУправляемоеПриложение Тогда | ||
|
||
Перем ПутьФайла1; | ||
Перем ПутьФайла2; | ||
|
||
//{ основная процедура для юнит-тестирования xUnitFor1C | ||
Перем ЮТест; | ||
|
||
Функция ПолучитьСписокТестов(ЮнитТестирование) Экспорт | ||
|
||
ЮТест = ЮнитТестирование; | ||
|
||
ВсеТесты = Новый Массив; | ||
|
||
ВсеТесты.Добавить("ТестДолжен_ПроверитьРавенствоФайлов"); | ||
ВсеТесты.Добавить("ТестДолжен_ПроверитьРавенствоФайловСУчетомПереданныхПараметровСравнения"); | ||
|
||
Возврат ВсеТесты; | ||
|
||
КонецФункции | ||
//} | ||
|
||
//{ блок юнит-тестов - сами тесты | ||
|
||
Процедура ПередЗапускомТеста() Экспорт | ||
КонецПроцедуры | ||
|
||
Процедура ПослеЗапускаТеста() Экспорт | ||
Попытка | ||
УдалитьФайлы(ПутьФайла1); | ||
УдалитьФайлы(ПутьФайла2); | ||
Исключение | ||
КонецПопытки; | ||
КонецПроцедуры | ||
|
||
Процедура ТестДолжен_ПроверитьРавенствоФайлов() Экспорт | ||
МассивСтрок = Новый Массив(); | ||
Для к = 1 По 10 Цикл | ||
МассивСтрок.Добавить("строка "+к); | ||
КонецЦикла; | ||
ПутьФайла1 = ПолучитьИмяВременногоФайла(); | ||
СоздатьТекстовыйФайл(ПутьФайла1, МассивСтрок); | ||
|
||
ПутьФайла2 = ПолучитьИмяВременногоФайла(); | ||
СоздатьТекстовыйФайл(ПутьФайла2, МассивСтрок); | ||
|
||
ЮТест.ПроверитьРавенствоФайлов(ПутьФайла1, ПутьФайла2, "ПутьФайла1, ПутьФайла2"); | ||
КонецПроцедуры | ||
|
||
Процедура ТестДолжен_ПроверитьРавенствоФайловСУчетомПереданныхПараметровСравнения() Экспорт | ||
СравнениеФайлов = Новый СравнениеФайлов; | ||
СравнениеФайлов.УчитыватьРегистр = Ложь; | ||
СравнениеФайлов.СпособСравнения = СпособСравненияФайлов.ТекстовыйДокумент; | ||
|
||
МассивСтрок = Новый Массив(); | ||
Для к = 1 По 10 Цикл | ||
МассивСтрок.Добавить("строка "+к); | ||
КонецЦикла; | ||
ПутьФайла1 = ПолучитьИмяВременногоФайла(); | ||
СоздатьТекстовыйФайл(ПутьФайла1, МассивСтрок); | ||
|
||
МассивСтрок2 = Новый Массив(); | ||
Для каждого Строка Из МассивСтрок Цикл | ||
МассивСтрок2.Добавить(ВРег(Строка)); | ||
КонецЦикла; | ||
|
||
ПутьФайла2 = ПолучитьИмяВременногоФайла(); | ||
СоздатьТекстовыйФайл(ПутьФайла2, МассивСтрок2); | ||
|
||
БылаПопытка = Ложь; | ||
Попытка | ||
ЮТест.ПроверитьРавенствоФайловСУчетомПереданныхПараметровСравнения(СравнениеФайлов, ПутьФайла1, ПутьФайла2, "ПутьФайла1, ПутьФайла2"); | ||
Исключение | ||
БылаПопытка = Истина; | ||
КонецПопытки; | ||
ЮТест.ПроверитьЛожь(БылаПопытка, "Ожидали исключение на утверждении сравнения файлов, а его не было"); | ||
КонецПроцедуры | ||
|
||
Процедура СоздатьТекстовыйФайл(ПутьФайла, МассивСтрок) | ||
Текст = Новый ТекстовыйДокумент; | ||
Для каждого Строка Из МассивСтрок Цикл | ||
Текст.ДобавитьСтроку(Строка); | ||
КонецЦикла; | ||
Текст.Записать(ПутьФайла); | ||
КонецПроцедуры | ||
|
||
//} | ||
#КонецЕсли |
7 changes: 7 additions & 0 deletions
7
src/Тесты/selftests/ТестыУтверждения_ПроверитьРавенствоФайлов/renames.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
14b97335-3f44-42ce-84bd-44eecba0fb30.0\info-->C:\Users\aayuhanov\AppData\Local\Temp\ТестыУтверждения_ПроверитьРавенствоФайлов.epf.und\14b97335-3f44-42ce-84bd-44eecba0fb30.0\info | ||
14b97335-3f44-42ce-84bd-44eecba0fb30.0\text-->ObjectModule.txt | ||
ce88669a-4b6f-4a4b-89c6-bd7db1a4961b-->und\ce88669a-4b6f-4a4b-89c6-bd7db1a4961b | ||
copyinfo-->und\copyinfo | ||
root-->und\root | ||
version-->und\version | ||
versions-->und\versions |
1 change: 1 addition & 0 deletions
1
...ТестыУтверждения_ПроверитьРавенствоФайлов/und/14b97335-3f44-42ce-84bd-44eecba0fb30.0/info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{3,1,0,"",0} |
17 changes: 17 additions & 0 deletions
17
...ftests/ТестыУтверждения_ПроверитьРавенствоФайлов/und/ce88669a-4b6f-4a4b-89c6-bd7db1a4961b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{1, | ||
{ce88669a-4b6f-4a4b-89c6-bd7db1a4961b},1, | ||
{c3831ec8-d8d5-4f93-8a22-f9bfae07327f, | ||
{1, | ||
{4,a7930311-6e7a-4ea6-a3ca-cecd4404b45f,0ec853a0-8164-4246-bc44-cc581c411a0b, | ||
{0, | ||
{0, | ||
{0,0,14b97335-3f44-42ce-84bd-44eecba0fb30},"ТестыУтверждения_ПроверитьРавенствоФайлов", | ||
{1,"ru","Тесты утверждения ""Проверить равенство файлов"""},""} | ||
},00000000-0000-0000-0000-000000000000,"",00000000-0000-0000-0000-000000000000},4, | ||
{2bcef0d1-0981-11d6-b9b8-0050bae0a95d,0}, | ||
{3daea016-69b7-4ed4-9453-127911372fe6,0}, | ||
{d5b0e5ed-256d-401c-9c36-f630cafd8a62,0}, | ||
{ec6bb5e5-b7a8-4d75-bec9-658107a699cf,0} | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/Тесты/selftests/ТестыУтверждения_ПроверитьРавенствоФайлов/und/copyinfo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{4, | ||
{0}, | ||
{0}, | ||
{0}, | ||
{0,0}, | ||
{0} | ||
} |
1 change: 1 addition & 0 deletions
1
src/Тесты/selftests/ТестыУтверждения_ПроверитьРавенствоФайлов/und/root
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{2,ce88669a-4b6f-4a4b-89c6-bd7db1a4961b,} |
3 changes: 3 additions & 0 deletions
3
src/Тесты/selftests/ТестыУтверждения_ПроверитьРавенствоФайлов/und/version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
{216,0} | ||
} |
1 change: 1 addition & 0 deletions
1
src/Тесты/selftests/ТестыУтверждения_ПроверитьРавенствоФайлов/und/versions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{1,7,"ce88669a-4b6f-4a4b-89c6-bd7db1a4961b",c7557053-799d-497d-9555-c4c98639a636,"root",84baf240-5c8a-4f33-9265-dc27ffd62951,"",0af8098b-2156-4cbc-97b5-b86bd0192716,"14b97335-3f44-42ce-84bd-44eecba0fb30.0",94738731-7749-463c-a164-241934ed5ea0,"copyinfo",4bd2e686-819d-4852-890f-80b9385b861e,"versions",2989eac3-e756-49b3-a5f6-eeeec4477e6a,"version",b5a74d15-8cad-419c-b48b-7392e3b866bc} |
Binary file not shown.