Permalink
Browse files

Remove / rewrite slow tests with questionable benefit

  • Loading branch information...
nwoolls committed Nov 21, 2014
1 parent 818fc0f commit c74843f66914bd7dc071ad908beb19aed9886ff5
Showing with 3 additions and 35 deletions.
  1. +0 −22 MultiMiner.Discovery.Tests/ListenerTests.cs
  2. +3 −13 MultiMiner.Engine.Tests/InstallerTests.cs
@@ -7,27 +7,5 @@ namespace MultiMiner.Discovery.Tests
[TestClass]
public class ListenerTests
{
[TestMethod]
public void Listener_ListenTwice_ThrowsSocketException()
{
Listener listener = new Listener();
listener.Listen(0);
try
{
try
{
new Listener().Listen(0);
Assert.Fail("No Exception thrown");
}
catch (Exception ex)
{
Assert.IsTrue(ex is SocketException);
}
}
finally
{
listener.Stop();
}
}
}
}
@@ -14,28 +14,18 @@ public class InstallerTests
const string UserAgent = "MultiMiner/V3-Example";
[TestMethod]
public void InstallMiner_Bfgminer_InstallsBfgminer()
public void GetAvailableMiners_ReturnsBfgminerUrl()
{
//arrange
string tempPath = Path.GetTempPath();
string minerPath = Path.Combine(tempPath, Guid.NewGuid().ToString());
Directory.CreateDirectory(minerPath);
string executablePath = Path.Combine(minerPath, "bfgminer.exe");
//act
List<AvailableMiner> availableMiners = AvailableMiners.GetAvailableMiners(UserAgent);
AvailableMiner bfgminer = availableMiners.Single(am => am.Name.Equals(MinerNames.BFGMiner, StringComparison.OrdinalIgnoreCase));
MinerInstaller.InstallMiner(UserAgent, bfgminer, minerPath);
//assert
Assert.IsTrue(File.Exists(executablePath));
//cleanup
Directory.Delete(minerPath, true);
Assert.IsTrue(!String.IsNullOrEmpty(bfgminer.Url));
}
[TestMethod]
public void GetAvailableMinerVersion_Succeeds()
public void GetAvailableMiners_Succeeds()
{
//act
Version version = null;

0 comments on commit c74843f

Please sign in to comment.