Skip to content
Snippets Groups Projects
Commit f5812d00 authored by Michael Ghebremussie's avatar Michael Ghebremussie
Browse files

Added Test Folder

parent 039c975d
No related branches found
No related tags found
No related merge requests found
Showing
with 33 additions and 8 deletions
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\NUnit.3.13.3\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.13.3\build\NUnit.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
...@@ -33,6 +34,9 @@ ...@@ -33,6 +34,9 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="nunit.framework, Version=3.13.3.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.13.3\lib\net35\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
...@@ -45,8 +49,18 @@ ...@@ -45,8 +49,18 @@
<Compile Include="Producer.cs" /> <Compile Include="Producer.cs" />
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Test\BufferTest.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\NUnit.3.13.3\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.13.3\build\NUnit.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">
......
using System; using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.ConstrainedExecution; using System.Runtime.ConstrainedExecution;
using System.Threading; using System.Threading;
...@@ -9,8 +10,8 @@ namespace ConsoleApplication1 ...@@ -9,8 +10,8 @@ namespace ConsoleApplication1
{ {
private Buffer _buffer; private Buffer _buffer;
private Random _random; private Random _random;
private Boolean _isAsleep; private bool _isAsleep;
private static Boolean _wakeConsumersUp; private static bool _wakeConsumersUp;
public Consumer(Buffer buffer) public Consumer(Buffer buffer)
{ {
...@@ -18,6 +19,7 @@ namespace ConsoleApplication1 ...@@ -18,6 +19,7 @@ namespace ConsoleApplication1
_random = new Random(); _random = new Random();
} }
[SuppressMessage("ReSharper", "FunctionNeverReturns")]
public void Consume() public void Consume()
{ {
while (true) while (true)
......
...@@ -3,14 +3,13 @@ using System.Threading; ...@@ -3,14 +3,13 @@ using System.Threading;
namespace ConsoleApplication1 namespace ConsoleApplication1
{ {
public class Producer public class Producer
{ {
private Buffer _buffer; private Buffer _buffer;
private Random _random; private Random _random;
private Boolean _isAsleep; private bool _isAsleep;
private static Boolean _wakeProducersUp; private static bool _wakeProducersUp;
public Producer(Buffer buffer) public Producer(Buffer buffer)
......
...@@ -16,8 +16,8 @@ namespace ConsoleApplication1 ...@@ -16,8 +16,8 @@ namespace ConsoleApplication1
public static void Main(string[] args) public static void Main(string[] args)
{ {
int nrProd = 0; int nrProd = 1;
int nrCons = 0; int nrCons = 1;
//Parse received program arguments to int //Parse received program arguments to int
try try
......
No preview for this file type
No preview for this file type
No preview for this file type
0b4c8a1d94f607e2a341f3264e9fea6d3251453f 888050fa31f1c6fa41893fd170b9d2c4392c6215
...@@ -11,3 +11,13 @@ C:\Users\Niklas\RiderProjects\inf3_gitlab\Aufgabe3\ConsoleApplication1\obj\Debug ...@@ -11,3 +11,13 @@ C:\Users\Niklas\RiderProjects\inf3_gitlab\Aufgabe3\ConsoleApplication1\obj\Debug
C:\Users\Niklas\RiderProjects\inf3_gitlab\Aufgabe3\ConsoleApplication1\obj\Debug\ConsoleApplication1.csproj.CoreCompileInputs.cache C:\Users\Niklas\RiderProjects\inf3_gitlab\Aufgabe3\ConsoleApplication1\obj\Debug\ConsoleApplication1.csproj.CoreCompileInputs.cache
C:\Users\Niklas\RiderProjects\inf3_gitlab\Aufgabe3\ConsoleApplication1\obj\Debug\ConsoleApplication1.exe C:\Users\Niklas\RiderProjects\inf3_gitlab\Aufgabe3\ConsoleApplication1\obj\Debug\ConsoleApplication1.exe
C:\Users\Niklas\RiderProjects\inf3_gitlab\Aufgabe3\ConsoleApplication1\obj\Debug\ConsoleApplication1.pdb C:\Users\Niklas\RiderProjects\inf3_gitlab\Aufgabe3\ConsoleApplication1\obj\Debug\ConsoleApplication1.pdb
D:\_Studium MKI\Semester 3\Informatik 3\Aufgaben\inf3\Aufgabe3\ConsoleApplication1\obj\Debug\ConsoleApplication1.csproj.AssemblyReference.cache
D:\_Studium MKI\Semester 3\Informatik 3\Aufgaben\inf3\Aufgabe3\ConsoleApplication1\obj\Debug\ConsoleApplication1.csproj.SuggestedBindingRedirects.cache
D:\_Studium MKI\Semester 3\Informatik 3\Aufgaben\inf3\Aufgabe3\ConsoleApplication1\obj\Debug\ConsoleApplication1.csproj.CoreCompileInputs.cache
D:\_Studium MKI\Semester 3\Informatik 3\Aufgaben\inf3\Aufgabe3\ConsoleApplication1\obj\Debug\ConsoleApplication1.exe
D:\_Studium MKI\Semester 3\Informatik 3\Aufgaben\inf3\Aufgabe3\ConsoleApplication1\obj\Debug\ConsoleApplication1.pdb
D:\_Studium MKI\Semester 3\Informatik 3\Aufgaben\inf3\Aufgabe3\ConsoleApplication1\bin\Debug\ConsoleApplication1.exe
D:\_Studium MKI\Semester 3\Informatik 3\Aufgaben\inf3\Aufgabe3\ConsoleApplication1\bin\Debug\ConsoleApplication1.pdb
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
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