Skip to content

Commit

Permalink
remove file_test
Browse files Browse the repository at this point in the history
  • Loading branch information
nameofSEOKWONHONG committed Jun 6, 2024
1 parent f2f7293 commit 180d09a
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions test/XFileTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,41 @@ namespace eXtensionSharp.test {
public class XFileTest
{
[SetUp]
public void setup()
public void Setup()
{

}

[Test]
public void file_test()
{
var filename = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "\test\test\test\test.txt");
if (filename.xExists()) filename.xDeleteAll();

var content = "hello world!";
var isException = false;

try
{
filename.xWrite(() => content.xToBytes());
}
catch
{
isException = true;
}

Assert.IsTrue(isException);

filename.xWriteAll(() => content.xToBytes());
var text = filename.xRead();
Assert.That(content, Is.EqualTo(text));

var fileName = filename.xGetFileName();
Assert.That(fileName, Is.EqualTo("test.txt"));

var extension = filename.xGetExtension();
Assert.That(extension, Is.EqualTo(".txt"));
}
// [Test]
// public void file_test()
// {
// var filename = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "\test\test\test\test.txt");
// if (filename.xExists()) filename.xDeleteAll();
//
// var content = "hello world!";
// var isException = false;
//
// try
// {
// filename.xWrite(() => content.xToBytes());
// }
// catch
// {
// isException = true;
// }
//
// Assert.IsTrue(isException);
//
// filename.xWriteAll(() => content.xToBytes());
// var text = filename.xRead();
// Assert.That(content, Is.EqualTo(text));
//
// var fileName = filename.xGetFileName();
// Assert.That(fileName, Is.EqualTo("test.txt"));
//
// var extension = filename.xGetExtension();
// Assert.That(extension, Is.EqualTo(".txt"));
// }

// [Test]
// public void search_files_test()
Expand Down

0 comments on commit 180d09a

Please sign in to comment.