Skip to content

Commit

Permalink
New : Added more Daten unit tests. #14
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueDotBrigadeFounder committed Nov 22, 2024
1 parent a2ce601 commit 880b4ee
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 6 deletions.
Git LFS file not shown
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Git LFS file not shown
37 changes: 31 additions & 6 deletions Tst/BlueDotBrigade.DatenLokator.TestTools-UnitTests/DatenTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Xml.Linq;
using BlueDotBrigade.DatenLokator.TestsTools;
using BlueDotBrigade.DatenLokator.TestsTools.IO;
using BlueDotBrigade.DatenLokator.TestsTools.NamingConventions;
using BlueDotBrigade.DatenLokator.TestsTools.Reflection;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection;
using BlueDotBrigade.DatenLokator.TestTools.IO;
using BlueDotBrigade.DatenLokator.TestTools.NamingConventions;
using Microsoft.VisualStudio.TestTools.UnitTesting;

[TestClass]
Expand Down Expand Up @@ -220,5 +216,34 @@ public void AsStreamReader_FileByConvention_ReturnsCorrectContent()
Assert.AreEqual(expected, actual.ReadToEnd());
}
#endregion

#region AsStreamReader
[TestMethod]
public void AsBmp_FileByDefault_ReturnsCorrectContent()
{
var expected = "Default source file shared by multiple tests.";
StreamReader actual = new Daten(_coordinator).AsStreamReader(From.GlobalDefault);

Assert.AreEqual(expected, actual.ReadToEnd());
}

[TestMethod]
public void AsBmp_FileByName_ReturnsCorrectContent()
{
var expected = "Requested input using specfic file name.";
StreamReader actual = new Daten(_coordinator).AsStreamReader("ImageBmp.Bmp");

Assert.AreEqual(expected, actual.ReadToEnd());
}

[TestMethod]
public void AsBmp_FileByConvention_ReturnsCorrectContent()
{
var expected = "Unit test name was used to select a source file.";
StreamReader actual = new Daten(_coordinator).AsStreamReader();

Assert.AreEqual(expected, actual.ReadToEnd());
}
#endregion
}
}

0 comments on commit 880b4ee

Please sign in to comment.