project/Application/UnitTestProject/FileSystemTest.cs

25 lines
589 B
C#
Raw Permalink Normal View History

2020-06-14 19:42:25 +02:00
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Application;
namespace UnitTestProject
{
[TestClass]
public class FileSystemTest
{
[TestMethod]
public void CheckCreateFile()
{
//Arrange
bool correctCreatedFile = FileSystem.CreateFile("file.txt");
bool incorrectCreatedFile = FileSystem.CreateFile("\"\"");
//Asssert
Assert.IsTrue(correctCreatedFile);
//test of incorect name of file
Assert.IsFalse(incorrectCreatedFile);
}
}
}