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

Added NUnit Test

parent 711f6dda
No related branches found
No related tags found
No related merge requests found
Showing
with 88523 additions and 0 deletions
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=f4fc3798_002D1b46_002D48e5_002Db694_002D237672f703ea/@EntryIndexedValue">&lt;SessionState ContinuousTestingMode="0" IsActive="True" Name="PushAndStopIfFull" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"&gt;&#xD;
&lt;TestAncestor&gt;&#xD;
&lt;TestId&gt;NUnit3x::F452348B-AED0-495C-9FED-657078DBB420::.NETFramework,Version=v3.5::ConsoleApplication1.Test.TestSuccess&lt;/TestId&gt;&#xD;
&lt;/TestAncestor&gt;&#xD;
&lt;/SessionState&gt;</s:String></wpf:ResourceDictionary>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Threading;
using NUnit.Framework;
namespace ConsoleApplication1.Test
{
[TestFixture]
public class TestSuccess
{
Buffer buffer = new Buffer();
private int _size = 10;
private Mutex _mutex;
private Queue<Car> _carQueue = new Queue<Car>();
Car _car;
[TestCase]
public void PushSuccessful()
{
Buffer buffer = new Buffer();
for (int i = 0; i < 10 ; i++)
{
buffer.Push(_car);
}
Assert.AreEqual(true,buffer.Full());
}
[TestCase]
public void PopSuccessful()
{
for (int i = 0; i <= 9 ; i++)
{
buffer.Push(_car);
}
for (int i = 0; i <= 9 ; i++)
{
buffer.Pop();
}
Assert.AreEqual(true,buffer.Empty());
}
}
}
\ No newline at end of file
File added
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="3.13.3" targetFramework="net35" />
</packages>
\ No newline at end of file
File added
This diff is collapsed.
Copyright (c) 2022 Charlie Poole, Rob Prouse
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
NUnit 3.0 is based on earlier versions of NUnit, with Portions
Copyright (c) 2002-2014 Charlie Poole or
Copyright (c) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov or
Copyright (c) 2000-2002 Philip A. Craig
File added
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ProjectCapability Include="TestContainer" />
</ItemGroup>
</Project>
Aufgabe3/packages/NUnit.3.13.3/icon.png

16 KiB

File added
This diff is collapsed.
File added
This diff is collapsed.
File added
This diff is collapsed.
File added
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