Skip to content
Snippets Groups Projects
Commit fbf34341 authored by niklasBr's avatar niklasBr
Browse files

Added TestCase

parent 08065c13
No related branches found
No related tags found
No related merge requests found
Showing with 22 additions and 2 deletions
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.ConstrainedExecution;
using System.Threading;
using NUnit.Framework;
namespace ConsoleApplication1
......@@ -42,6 +44,9 @@ namespace ConsoleApplication1
{
Thread.Sleep(_random.Next(500, 1500));
Mutex m = _buffer.GetMutex();
Debug.Assert(m != null);
m.WaitOne();
if (_buffer.Full())
......
......@@ -41,6 +41,11 @@ namespace ConsoleApplication1.Test
Assert.AreEqual(true,buffer.Empty());
}
[TestCase]
public void MoreConsumersThanProducers()
{
string[] args = { "0", "15"};
Assert.DoesNotThrow(() => Program.Main(args));
}
}
}
\ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
888050fa31f1c6fa41893fd170b9d2c4392c6215
3907b20a7c0e5fabf62f05866576b7ee8d3545c6
......@@ -21,3 +21,13 @@ D:\_Studium MKI\Semester 3\Informatik 3\Aufgaben\inf3\Aufgabe3\ConsoleApplicatio
D:\_Studium MKI\Semester 3\Informatik 3\Aufgaben\inf3\Aufgabe3\ConsoleApplication1\bin\Debug\nunit.framework.dll
D:\_Studium MKI\Semester 3\Informatik 3\Aufgaben\inf3\Aufgabe3\ConsoleApplication1\bin\Debug\nunit.framework.xml
D:\_Studium MKI\Semester 3\Informatik 3\Aufgaben\inf3\Aufgabe3\ConsoleApplication1\obj\Debug\ConsoleApplication1.csproj.CopyComplete
C:\Users\qwert\RiderProjects\inf3_git_neu\Aufgabe3\ConsoleApplication1\bin\Debug\ConsoleApplication1.exe
C:\Users\qwert\RiderProjects\inf3_git_neu\Aufgabe3\ConsoleApplication1\bin\Debug\ConsoleApplication1.pdb
C:\Users\qwert\RiderProjects\inf3_git_neu\Aufgabe3\ConsoleApplication1\bin\Debug\nunit.framework.dll
C:\Users\qwert\RiderProjects\inf3_git_neu\Aufgabe3\ConsoleApplication1\bin\Debug\nunit.framework.xml
C:\Users\qwert\RiderProjects\inf3_git_neu\Aufgabe3\ConsoleApplication1\obj\Debug\ConsoleApplication1.csproj.AssemblyReference.cache
C:\Users\qwert\RiderProjects\inf3_git_neu\Aufgabe3\ConsoleApplication1\obj\Debug\ConsoleApplication1.csproj.SuggestedBindingRedirects.cache
C:\Users\qwert\RiderProjects\inf3_git_neu\Aufgabe3\ConsoleApplication1\obj\Debug\ConsoleApplication1.csproj.CoreCompileInputs.cache
C:\Users\qwert\RiderProjects\inf3_git_neu\Aufgabe3\ConsoleApplication1\obj\Debug\ConsoleApplication1.csproj.CopyComplete
C:\Users\qwert\RiderProjects\inf3_git_neu\Aufgabe3\ConsoleApplication1\obj\Debug\ConsoleApplication1.exe
C:\Users\qwert\RiderProjects\inf3_git_neu\Aufgabe3\ConsoleApplication1\obj\Debug\ConsoleApplication1.pdb
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment