25 lines
589 B
C#
25 lines
589 B
C#
|
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);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|