<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://elvis.hcw.ac.at/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JJermias</id>
	<title>Elvis Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://elvis.hcw.ac.at/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JJermias"/>
	<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php/Special:Contributions/JJermias"/>
	<updated>2026-09-10T20:25:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.5</generator>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11212</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11212"/>
		<updated>2023-01-28T13:49:34Z</updated>

		<summary type="html">&lt;p&gt;JJermias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Visual Studio Code (or any other IDE)&lt;br /&gt;
* Packages (depending on the Programming language and the used Framework). &amp;lt;br&amp;gt;For example: &lt;br /&gt;
**unittest.mock (Python)&lt;br /&gt;
** org.mockito.Mockito(Java) &lt;br /&gt;
** Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Mocking is a process used in unit testing when unit being tested has external dependencies.It creates mock objects (also known as replacement or dummy objects) that can be used in the simulation of real objects.The main purpose of this process is isolation of code being tested rather than concentrating on the behaviour or state of external dependencies.Mocking is normally required when components under test has dependencies which has not been implemented yet or if implementation is in progress (eg:REST APIs) or when components update system state(DB calls).&lt;br /&gt;
&lt;br /&gt;
Mocking makes use of three types of replacement objects: fakes, stubs and mocks. The fakes are used when you want to test the behavior of a class that has no dependencies. The stubs are used to test the behavior of a class that has dependencies.They will return results based on specific set of inputs and won&#039;t respond to something outside of what is programmed for the test. The mocks are advanced version of stubs which can also additionally modify behaviors like how many times method should be called, with what data and in which order.&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Mocking Frameworks are software libraries used to generate replacement objects like Stubs and Mocks i.e dummy implementation does not have to be written in addition to real implementation,and they also compliments Unit Testing Frameworks by isolating dependencies. But remember they are not a replacement for unit testing frameworks and they should not be used to test the actual behavior of the software. Rather they are used to simulate or mock dependencies, especially to simulate external APIs and Databases in tests.&lt;br /&gt;
&lt;br /&gt;
==== Advantages ====&lt;br /&gt;
* Tests can be isolated and thereby improving the test quality. It helps developers to write focused and concise unit tests.&lt;br /&gt;
&lt;br /&gt;
* It can also help to run tests faster and generate test data.&lt;br /&gt;
&lt;br /&gt;
* Tests can also been done in case the external Dependency is not reachable or has other kind of problems.&lt;br /&gt;
&lt;br /&gt;
==== Disadvantages ====&lt;br /&gt;
* Can lead to complex and difficult-to-understand tests if not used carefully.&lt;br /&gt;
&lt;br /&gt;
* Can also lead to writing tests that do not adequately reflect the actual behavior of the software.&lt;br /&gt;
&lt;br /&gt;
==== Frameworks in different programming languages ====&lt;br /&gt;
&lt;br /&gt;
* Mockito (Java)&lt;br /&gt;
* Moq (.NET)&lt;br /&gt;
* Mock (Python)&lt;br /&gt;
* EasyMock (Java)&lt;br /&gt;
* jMock (Java)&lt;br /&gt;
* Sinon.js(JS)&lt;br /&gt;
* pymox (Python)&lt;br /&gt;
* rr (Ruby)&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&amp;lt;!--[[File:Mock.png]]&lt;br /&gt;
[[File:Mockito.png]]&lt;br /&gt;
[[File:Moq.png]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;100%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! .NET (Moq)&lt;br /&gt;
! Java (Mockito)&lt;br /&gt;
! Python (Mock)&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
using Moq;&lt;br /&gt;
public interface IPerson&lt;br /&gt;
{&lt;br /&gt;
    string Greet();&lt;br /&gt;
}&lt;br /&gt;
public class Person : IPerson&lt;br /&gt;
{&lt;br /&gt;
    private string name;&lt;br /&gt;
    public Person(string lname){&lt;br /&gt;
        name=lname;&lt;br /&gt;
    }&lt;br /&gt;
    public string Greet()&lt;br /&gt;
    {&lt;br /&gt;
        return &amp;quot;Hello, my name is &amp;quot;+name;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
class Program&lt;br /&gt;
{&lt;br /&gt;
    static void Main(string[] args)&lt;br /&gt;
    {&lt;br /&gt;
        // Wir erstellen eine Instanz von IPerson&lt;br /&gt;
        IPerson person = new Person(&amp;quot;John&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // Wir erstellen eine Mock-Instanz von IPerson&lt;br /&gt;
        var mockPerson = new Mock&amp;lt;IPerson&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
        // Wir konfigurieren die Methode Greet() der Mock-Instanz, &lt;br /&gt;
        //um immer &amp;quot;Mock greeting&amp;quot; zurückzugeben&lt;br /&gt;
        mockPerson.Setup(x =&amp;gt; x.Greet()).Returns(&amp;quot;Mock greeting&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // Wir vergleichen die Ausgabe von Greet() von beiden&lt;br /&gt;
        Console.WriteLine(person.Greet());  &lt;br /&gt;
        // Ausgabe: &amp;quot;Hello, my name is John&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        Console.WriteLine(mockPerson.Object.Greet());  &lt;br /&gt;
        // Ausgabe: &amp;quot;Mock greeting&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import org.mockito.Mockito;&lt;br /&gt;
&lt;br /&gt;
public class Person {&lt;br /&gt;
    private String name;&lt;br /&gt;
    &lt;br /&gt;
    public Person(String name) {&lt;br /&gt;
        this.name = name;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    public String greet() {&lt;br /&gt;
        return &amp;quot;Hello, my name is &amp;quot; + this.name;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
// Wir erstellen eine Instanz von Person&lt;br /&gt;
Person person = new Person(&amp;quot;John&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// Wir erstellen eine Mock-Instanz von Person&lt;br /&gt;
Person mockPerson = Mockito.mock(Person.class);&lt;br /&gt;
&lt;br /&gt;
// Wir konfigurieren die Methode greet() der Mock-Instanz, &lt;br /&gt;
// um immer &amp;quot;Mock greeting&amp;quot; zurückzugeben&lt;br /&gt;
Mockito.when(mockPerson.greet()).thenReturn(&amp;quot;Mock greeting&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// Wir vergleichen die Ausgabe von greet() von beiden&lt;br /&gt;
System.out.println(person.greet());  &lt;br /&gt;
// Ausgabe: &amp;quot;Hello, my name is John&amp;quot;&lt;br /&gt;
&lt;br /&gt;
System.out.println(mockPerson.greet());  &lt;br /&gt;
// Ausgabe: &amp;quot;Mock greeting&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from unittest.mock import Mock&lt;br /&gt;
&lt;br /&gt;
class Person:&lt;br /&gt;
    def __init__(self, name):&lt;br /&gt;
        self.name = name&lt;br /&gt;
        &lt;br /&gt;
    def greet(self):&lt;br /&gt;
        return &amp;quot;Hello, my name is &amp;quot; + self.name&lt;br /&gt;
&lt;br /&gt;
# Wir erstellen eine Instanz von Person &lt;br /&gt;
person = Person(&amp;quot;John&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# Wir erstellen eine Mock-Instanz von Person&lt;br /&gt;
mock_person = Mock(spec=Person)&lt;br /&gt;
&lt;br /&gt;
# Wir konfigurieren die Methode greet() der Mock-Instanz,&lt;br /&gt;
# um immer &amp;quot;Mock greeting&amp;quot; zurückzugeben&lt;br /&gt;
mock_person.greet.return_value = &amp;quot;Mock greeting&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Wir vergleichen die Ausgabe von greet()&lt;br /&gt;
print(person.greet())  &lt;br /&gt;
# Ausgabe: &amp;quot;Hello, my name is John&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print(mock_person.greet())  &lt;br /&gt;
# Ausgabe: &amp;quot;Mock greeting&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Mock Demo in Python ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import unittest&lt;br /&gt;
from unittest.mock import Mock, patch&lt;br /&gt;
import requests&lt;br /&gt;
import json&lt;br /&gt;
&lt;br /&gt;
def get_users():&lt;br /&gt;
    # API-Aufruf einer Beispiel API, der Benutzerdaten abruft&lt;br /&gt;
    response = requests.get(f&amp;quot;https://gorest.co.in/public/v2/users&amp;quot;)&lt;br /&gt;
    if response.status_code == 200:&lt;br /&gt;
        return response.json()&lt;br /&gt;
    return None&lt;br /&gt;
&lt;br /&gt;
def DoesGowdaExist(users:list[dict]):&lt;br /&gt;
    # Testet ob ein Benutzer namens &amp;quot;Gowda&amp;quot; existiert&lt;br /&gt;
    for user in users:&lt;br /&gt;
        if &amp;quot;Gowda&amp;quot; in user[&amp;quot;name&amp;quot;]:&lt;br /&gt;
            return True&lt;br /&gt;
    return False&lt;br /&gt;
&lt;br /&gt;
class TestAPI(unittest.TestCase):&lt;br /&gt;
    @patch(&amp;quot;requests.get&amp;quot;)&lt;br /&gt;
    def test_get_user_data(self, mock_get):&lt;br /&gt;
        # Unittest bei dem statt der Beipiel-API ein Mock verwendet wird&lt;br /&gt;
        mock_result = [{&amp;quot;id&amp;quot;: 1, &amp;quot;name&amp;quot;: &amp;quot;Gowda&amp;quot;, &lt;br /&gt;
                        &#039;email&#039;: &#039;test@user.com&#039;, &lt;br /&gt;
                        &#039;gender&#039;: &#039;male&#039;, &#039;status&#039;: &#039;active&#039;}]&lt;br /&gt;
        # Erstelle einen Mock für die response-Variable&lt;br /&gt;
        mock_response = Mock()&lt;br /&gt;
        mock_response.status_code = 200&lt;br /&gt;
        mock_response.json.return_value = mock_result&lt;br /&gt;
&lt;br /&gt;
        # Setze den Rückgabewert des Mock-Objekts für den get-Aufruf&lt;br /&gt;
        mock_get.return_value = mock_response&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        # Rufe die get_user_data-Funktion auf&lt;br /&gt;
        users = get_users()&lt;br /&gt;
&lt;br /&gt;
        print(f&amp;quot;users: {json.dumps(users, indent=4)}&amp;quot;)&lt;br /&gt;
        # Stelle sicher, dass der Rückgabewert des Mock-Objekts zurückgegeben wurde&lt;br /&gt;
        self.assertEqual(users, mock_result)&lt;br /&gt;
        self.assertTrue(DoesGowdaExist(users),&amp;quot;Gowda does not exist&amp;quot;)&lt;br /&gt;
        print(&amp;quot;Gowda does exist&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
def main(mock:bool):&lt;br /&gt;
    # Wenn mock=False ist, wird die API aufgerufen&lt;br /&gt;
    # Wenn mock=False ist wird der Unitest ausgeführt der den Aufruf der API mit einem Mock-Objekt überschreibt&lt;br /&gt;
    if mock:&lt;br /&gt;
        unittest.main()&lt;br /&gt;
    else:&lt;br /&gt;
        users= get_users()&lt;br /&gt;
        print(f&amp;quot;users: {json.dumps(users, indent=4)} \n\n&amp;quot;)&lt;br /&gt;
        print(f&amp;quot;Gowda does {&#039;&#039; if DoesGowdaExist(users) else &#039;not &#039;}exist&amp;quot;)&lt;br /&gt;
            &lt;br /&gt;
&lt;br /&gt;
if __name__ == &#039;__main__&#039;:&lt;br /&gt;
    main(mock=True)&lt;br /&gt;
    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11153</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11153"/>
		<updated>2023-01-24T01:09:35Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Visual Studio Code&lt;br /&gt;
* Packages: unittest.mock (Python), org.mockito.Mockito(Java) and Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Mocking is a process used in unit testing when unit being tested has external dependencies.It creates mock objects (also known as replacement or dummy objects) that can be used in the simulation of real objects.The main purpose of this process is isolation of code being tested rather than concentrating on the behaviour or state of external dependencies.Mocking is normally required when components under test has dependencies which has no been implemented yet or if implementation is in progress (eg:REST APIs) or when components update system state(DB calls).&lt;br /&gt;
&lt;br /&gt;
Mocking makes use of three types of replacement objects: fakes, stubs and mocks. The fakes are used when you want to test the behavior of a class that has no dependencies. The stubs are used to test the behavior of a class that has dependencies.They will return results based on specific set of inputs and won&#039;t respond to something outside of what is programmed for the test. The mocks are advanced version of stubs which can also additionally modify behaviors like how many times method should be called, with what data and in which order.&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Mocking Frameworks are software libraries used to generate replacement objects like Stubs and Mocks i.e dummy implementation does not have to be written in addition to real implementation,and they also compliments Unit Testing Frameworks by isolating dependencies. But remember they are not replacement for unit testing frameworks and they should not be used to test the actual behavior of the software. Rather they are used to simulate or mock dependencies, especially to simulate external APIs and Databases in tests.&lt;br /&gt;
&lt;br /&gt;
==== Advantages ====&lt;br /&gt;
* Tests can be isolated and thereby improving the test quality. It helps developers to write focused and concise unit tests.&lt;br /&gt;
&lt;br /&gt;
* It can also help to run tests faster and generate test data.&lt;br /&gt;
&lt;br /&gt;
==== Disadvantages ====&lt;br /&gt;
* Can lead to complex and difficult-to-understand tests if not used carefully.&lt;br /&gt;
&lt;br /&gt;
* Can also lead to writing tests that do not adequately reflect the actual behavior of the software.&lt;br /&gt;
&lt;br /&gt;
==== Frameworks in different programming languages ====&lt;br /&gt;
&lt;br /&gt;
* Mockito (Java)&lt;br /&gt;
* Moq (.NET)&lt;br /&gt;
* Mock (Python)&lt;br /&gt;
* EasyMock (Java)&lt;br /&gt;
* jMock (Java)&lt;br /&gt;
* Sinon.js(JS)&lt;br /&gt;
* pymox (Python)&lt;br /&gt;
* rr (Ruby)&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
[[File:Mock.png]]&lt;br /&gt;
[[File:Mockito.png]]&lt;br /&gt;
[[File:Moq.png]]&lt;br /&gt;
&lt;br /&gt;
==== Mock Demo in Python ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import unittest&lt;br /&gt;
from unittest.mock import Mock, patch&lt;br /&gt;
import requests&lt;br /&gt;
&lt;br /&gt;
def get_user_data(user_id):&lt;br /&gt;
    # Simuliere einen API-Aufruf, der Benutzerdaten abruft&lt;br /&gt;
    response = requests.get(f&amp;quot;https://gorest.co.in/public/v2/users/{user_id}&amp;quot;)&lt;br /&gt;
    if response.status_code == 200:&lt;br /&gt;
        return response.json()&lt;br /&gt;
    return None&lt;br /&gt;
&lt;br /&gt;
def DoesTanyaExist(user):&lt;br /&gt;
    if &amp;quot;Tanya&amp;quot; in user[&amp;quot;name&amp;quot;]:&lt;br /&gt;
        return True&lt;br /&gt;
    return False&lt;br /&gt;
&lt;br /&gt;
class TestAPI(unittest.TestCase):&lt;br /&gt;
    @patch(&amp;quot;requests.get&amp;quot;)&lt;br /&gt;
    def test_get_user_data(self, mock_get):&lt;br /&gt;
        mock_result = {&amp;quot;id&amp;quot;: 1, &amp;quot;name&amp;quot;: &amp;quot;Tanya&amp;quot;, &#039;email&#039;: &#039;test@user.com&#039;, &#039;gender&#039;: &#039;male&#039;, &#039;status&#039;: &#039;active&#039;}&lt;br /&gt;
        # Erstelle einen Mock für die response-Variable&lt;br /&gt;
        mock_response = Mock()&lt;br /&gt;
        mock_response.status_code = 200&lt;br /&gt;
        mock_response.json.return_value = mock_result&lt;br /&gt;
&lt;br /&gt;
        # Setze den Rückgabewert des Mock-Objekts für den get-Aufruf&lt;br /&gt;
        mock_get.return_value = mock_response&lt;br /&gt;
&lt;br /&gt;
        # Rufe die get_user_data-Funktion auf&lt;br /&gt;
        user_data = get_user_data(4171)&lt;br /&gt;
&lt;br /&gt;
        print(user_data)&lt;br /&gt;
        # Stelle sicher, dass der Rückgabewert des Mock-Objekts zurückgegeben wurde&lt;br /&gt;
        self.assertEqual(user_data, mock_result)&lt;br /&gt;
        self.assertTrue(DoesTanyaExist(user_data),&amp;quot;Tanja does not exist&amp;quot;)&lt;br /&gt;
        print(&amp;quot;Tanja does exist&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
if __name__ == &#039;__main__&#039;:&lt;br /&gt;
    # unittest.main()&lt;br /&gt;
    &lt;br /&gt;
    user= get_user_data(4171)&lt;br /&gt;
    print(f&amp;quot;user: {user}&amp;quot;)&lt;br /&gt;
    print(f&amp;quot;Tanja does {&#039;&#039; if DoesTanyaExist(user) else &#039;not &#039;}exist&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11152</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11152"/>
		<updated>2023-01-24T01:00:27Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
* Packages: unittest.mock (Python), org.mockito.Mockito(Java) and Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Mocking is a process used in unit testing when unit being tested has external dependencies.It creates mock objects (also known as replacement or dummy objects) that can be used in the simulation of real objects.The main purpose of this process is isolation of code being tested rather than concentrating on the behaviour or state of external dependencies.Mocking is normally required when components under test has dependencies which has no been implemented yet or if implementation is in progress (eg:REST APIs) or when components update system state(DB calls).&lt;br /&gt;
&lt;br /&gt;
Mocking makes use of three types of replacement objects: fakes, stubs and mocks. The fakes are used when you want to test the behavior of a class that has no dependencies. The stubs are used to test the behavior of a class that has dependencies.They will return results based on specific set of inputs and won&#039;t respond to something outside of what is programmed for the test. The mocks are advanced version of stubs which can also additionally modify behaviors like how many times method should be called, with what data and in which order.&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Mocking Frameworks are software libraries used to generate replacement objects like Stubs and Mocks i.e dummy implementation does not have to be written in addition to real implementation,and they also compliments Unit Testing Frameworks by isolating dependencies. But remember they are not replacement for unit testing frameworks and they should not be used to test the actual behavior of the software. Rather they are used to simulate or mock dependencies, especially to simulate external APIs and Databases in tests.&lt;br /&gt;
&lt;br /&gt;
==== Advantages ====&lt;br /&gt;
* Tests can be isolated and thereby improving the test quality. It helps developers to write focused and concise unit tests.&lt;br /&gt;
&lt;br /&gt;
* It can also help to run tests faster and generate test data.&lt;br /&gt;
&lt;br /&gt;
==== Disadvantages ====&lt;br /&gt;
* Can lead to complex and difficult-to-understand tests if not used carefully.&lt;br /&gt;
&lt;br /&gt;
* Can also lead to writing tests that do not adequately reflect the actual behavior of the software.&lt;br /&gt;
&lt;br /&gt;
==== Frameworks in different programming languages ====&lt;br /&gt;
&lt;br /&gt;
* Mockito (Java)&lt;br /&gt;
* Moq (.NET)&lt;br /&gt;
* Mock (Python)&lt;br /&gt;
* EasyMock (Java)&lt;br /&gt;
* jMock (Java)&lt;br /&gt;
* Sinon.js(JS)&lt;br /&gt;
* pymox (Python)&lt;br /&gt;
* rr (Ruby)&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
[[File:Mock.png]]&lt;br /&gt;
[[File:Mockito.png]]&lt;br /&gt;
[[File:Moq.png]]&lt;br /&gt;
&lt;br /&gt;
==== Mock Demo in Python ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import unittest&lt;br /&gt;
from unittest.mock import Mock, patch&lt;br /&gt;
import requests&lt;br /&gt;
&lt;br /&gt;
def get_user_data(user_id):&lt;br /&gt;
    # Simuliere einen API-Aufruf, der Benutzerdaten abruft&lt;br /&gt;
    response = requests.get(f&amp;quot;https://gorest.co.in/public/v2/users/{user_id}&amp;quot;)&lt;br /&gt;
    if response.status_code == 200:&lt;br /&gt;
        return response.json()&lt;br /&gt;
    return None&lt;br /&gt;
&lt;br /&gt;
def DoesTanyaExist(user):&lt;br /&gt;
    if &amp;quot;Tanya&amp;quot; in user[&amp;quot;name&amp;quot;]:&lt;br /&gt;
        return True&lt;br /&gt;
    return False&lt;br /&gt;
&lt;br /&gt;
class TestAPI(unittest.TestCase):&lt;br /&gt;
    @patch(&amp;quot;requests.get&amp;quot;)&lt;br /&gt;
    def test_get_user_data(self, mock_get):&lt;br /&gt;
        mock_result = {&amp;quot;id&amp;quot;: 1, &amp;quot;name&amp;quot;: &amp;quot;Tanya&amp;quot;, &#039;email&#039;: &#039;test@user.com&#039;, &#039;gender&#039;: &#039;male&#039;, &#039;status&#039;: &#039;active&#039;}&lt;br /&gt;
        # Erstelle einen Mock für die response-Variable&lt;br /&gt;
        mock_response = Mock()&lt;br /&gt;
        mock_response.status_code = 200&lt;br /&gt;
        mock_response.json.return_value = mock_result&lt;br /&gt;
&lt;br /&gt;
        # Setze den Rückgabewert des Mock-Objekts für den get-Aufruf&lt;br /&gt;
        mock_get.return_value = mock_response&lt;br /&gt;
&lt;br /&gt;
        # Rufe die get_user_data-Funktion auf&lt;br /&gt;
        user_data = get_user_data(4171)&lt;br /&gt;
&lt;br /&gt;
        print(user_data)&lt;br /&gt;
        # Stelle sicher, dass der Rückgabewert des Mock-Objekts zurückgegeben wurde&lt;br /&gt;
        self.assertEqual(user_data, mock_result)&lt;br /&gt;
        self.assertTrue(DoesTanyaExist(user_data),&amp;quot;Tanja does not exist&amp;quot;)&lt;br /&gt;
        print(&amp;quot;Tanja does exist&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
if __name__ == &#039;__main__&#039;:&lt;br /&gt;
    # unittest.main()&lt;br /&gt;
    &lt;br /&gt;
    user= get_user_data(4171)&lt;br /&gt;
    print(f&amp;quot;user: {user}&amp;quot;)&lt;br /&gt;
    print(f&amp;quot;Tanja does {&#039;&#039; if DoesTanyaExist(user) else &#039;not &#039;}exist&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Moq.png&amp;diff=11151</id>
		<title>File:Moq.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Moq.png&amp;diff=11151"/>
		<updated>2023-01-24T00:57:57Z</updated>

		<summary type="html">&lt;p&gt;JJermias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Mockito.png&amp;diff=11150</id>
		<title>File:Mockito.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Mockito.png&amp;diff=11150"/>
		<updated>2023-01-24T00:57:11Z</updated>

		<summary type="html">&lt;p&gt;JJermias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Mock.png&amp;diff=11149</id>
		<title>File:Mock.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Mock.png&amp;diff=11149"/>
		<updated>2023-01-24T00:56:38Z</updated>

		<summary type="html">&lt;p&gt;JJermias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11148</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11148"/>
		<updated>2023-01-24T00:32:06Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Mock Demo in Python */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
* Packages: unittest.mock (Python), org.mockito.Mockito(Java) and Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Mocking is a process used in unit testing when unit being tested has external dependencies.It creates mock objects (also known as replacement or dummy objects) that can be used in the simulation of real objects.The main purpose of this process is isolation of code being tested rather than concentrating on the behaviour or state of external dependencies.Mocking is normally required when components under test has dependencies which has no been implemented yet or if implementation is in progress (eg:REST APIs) or when components update system state(DB calls).&lt;br /&gt;
&lt;br /&gt;
Mocking makes use of three types of replacement objects: fakes, stubs and mocks. The fakes are used when you want to test the behavior of a class that has no dependencies. The stubs are used to test the behavior of a class that has dependencies.They will return results based on specific set of inputs and won&#039;t respond to something outside of what is programmed for the test. The mocks are advanced version of stubs which can also additionally modify behaviors like how many times method should be called, with what data and in which order.&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Mocking Frameworks are software libraries used to generate replacement objects like Stubs and Mocks i.e dummy implementation does not have to be written in addition to real implementation,and they also compliments Unit Testing Frameworks by isolating dependencies. But remember they are not replacement for unit testing frameworks and they should not be used to test the actual behavior of the software. Rather they are used to simulate or mock dependencies, especially to simulate external APIs and Databases in tests.&lt;br /&gt;
&lt;br /&gt;
==== Advantages ====&lt;br /&gt;
* Tests can be isolated and thereby improving the test quality. It helps developers to write focused and concise unit tests.&lt;br /&gt;
&lt;br /&gt;
* It can also help to run tests faster and generate test data.&lt;br /&gt;
&lt;br /&gt;
==== Disadvantages ====&lt;br /&gt;
* Can lead to complex and difficult-to-understand tests if not used carefully.&lt;br /&gt;
&lt;br /&gt;
* Can also lead to writing tests that do not adequately reflect the actual behavior of the software.&lt;br /&gt;
&lt;br /&gt;
==== Frameworks in different programming languages ====&lt;br /&gt;
&lt;br /&gt;
* Mockito (Java)&lt;br /&gt;
* Moq (.NET)&lt;br /&gt;
* Mock (Python)&lt;br /&gt;
* EasyMock (Java)&lt;br /&gt;
* jMock (Java)&lt;br /&gt;
* Sinon.js(JS)&lt;br /&gt;
* pymox (Python)&lt;br /&gt;
* rr (Ruby)&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Mock Demo in Python ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import unittest&lt;br /&gt;
from unittest.mock import Mock, patch&lt;br /&gt;
import requests&lt;br /&gt;
&lt;br /&gt;
def get_user_data(user_id):&lt;br /&gt;
    # Simuliere einen API-Aufruf, der Benutzerdaten abruft&lt;br /&gt;
    response = requests.get(f&amp;quot;https://gorest.co.in/public/v2/users/{user_id}&amp;quot;)&lt;br /&gt;
    if response.status_code == 200:&lt;br /&gt;
        return response.json()&lt;br /&gt;
    return None&lt;br /&gt;
&lt;br /&gt;
def DoesTanyaExist(user):&lt;br /&gt;
    if &amp;quot;Tanya&amp;quot; in user[&amp;quot;name&amp;quot;]:&lt;br /&gt;
        return True&lt;br /&gt;
    return False&lt;br /&gt;
&lt;br /&gt;
class TestAPI(unittest.TestCase):&lt;br /&gt;
    @patch(&amp;quot;requests.get&amp;quot;)&lt;br /&gt;
    def test_get_user_data(self, mock_get):&lt;br /&gt;
        mock_result = {&amp;quot;id&amp;quot;: 1, &amp;quot;name&amp;quot;: &amp;quot;Tanya&amp;quot;, &#039;email&#039;: &#039;test@user.com&#039;, &#039;gender&#039;: &#039;male&#039;, &#039;status&#039;: &#039;active&#039;}&lt;br /&gt;
        # Erstelle einen Mock für die response-Variable&lt;br /&gt;
        mock_response = Mock()&lt;br /&gt;
        mock_response.status_code = 200&lt;br /&gt;
        mock_response.json.return_value = mock_result&lt;br /&gt;
&lt;br /&gt;
        # Setze den Rückgabewert des Mock-Objekts für den get-Aufruf&lt;br /&gt;
        mock_get.return_value = mock_response&lt;br /&gt;
&lt;br /&gt;
        # Rufe die get_user_data-Funktion auf&lt;br /&gt;
        user_data = get_user_data(4171)&lt;br /&gt;
&lt;br /&gt;
        print(user_data)&lt;br /&gt;
        # Stelle sicher, dass der Rückgabewert des Mock-Objekts zurückgegeben wurde&lt;br /&gt;
        self.assertEqual(user_data, mock_result)&lt;br /&gt;
        self.assertTrue(DoesTanyaExist(user_data),&amp;quot;Tanja does not exist&amp;quot;)&lt;br /&gt;
        print(&amp;quot;Tanja does exist&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
if __name__ == &#039;__main__&#039;:&lt;br /&gt;
    # unittest.main()&lt;br /&gt;
    &lt;br /&gt;
    user= get_user_data(4171)&lt;br /&gt;
    print(f&amp;quot;user: {user}&amp;quot;)&lt;br /&gt;
    print(f&amp;quot;Tanja does {&#039;&#039; if DoesTanyaExist(user) else &#039;not &#039;}exist&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11147</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11147"/>
		<updated>2023-01-24T00:27:41Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Mocking Frameworks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
* Packages: unittest.mock (Python), org.mockito.Mockito(Java) and Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Mocking is a process used in unit testing when unit being tested has external dependencies.It creates mock objects (also known as replacement or dummy objects) that can be used in the simulation of real objects.The main purpose of this process is isolation of code being tested rather than concentrating on the behaviour or state of external dependencies.Mocking is normally required when components under test has dependencies which has no been implemented yet or if implementation is in progress (eg:REST APIs) or when components update system state(DB calls).&lt;br /&gt;
&lt;br /&gt;
Mocking makes use of three types of replacement objects: fakes, stubs and mocks. The fakes are used when you want to test the behavior of a class that has no dependencies. The stubs are used to test the behavior of a class that has dependencies.They will return results based on specific set of inputs and won&#039;t respond to something outside of what is programmed for the test. The mocks are advanced version of stubs which can also additionally modify behaviors like how many times method should be called, with what data and in which order.&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Mocking Frameworks are software libraries used to generate replacement objects like Stubs and Mocks i.e dummy implementation does not have to be written in addition to real implementation,and they also compliments Unit Testing Frameworks by isolating dependencies. But remember they are not replacement for unit testing frameworks and they should not be used to test the actual behavior of the software. Rather they are used to simulate or mock dependencies, especially to simulate external APIs and Databases in tests.&lt;br /&gt;
&lt;br /&gt;
==== Advantages ====&lt;br /&gt;
* Tests can be isolated and thereby improving the test quality. It helps developers to write focused and concise unit tests.&lt;br /&gt;
&lt;br /&gt;
* It can also help to run tests faster and generate test data.&lt;br /&gt;
&lt;br /&gt;
==== Disadvantages ====&lt;br /&gt;
* Can lead to complex and difficult-to-understand tests if not used carefully.&lt;br /&gt;
&lt;br /&gt;
* Can also lead to writing tests that do not adequately reflect the actual behavior of the software.&lt;br /&gt;
&lt;br /&gt;
==== Frameworks in different programming languages ====&lt;br /&gt;
&lt;br /&gt;
* Mockito (Java)&lt;br /&gt;
* Moq (.NET)&lt;br /&gt;
* Mock (Python)&lt;br /&gt;
* EasyMock (Java)&lt;br /&gt;
* jMock (Java)&lt;br /&gt;
* Sinon.js(JS)&lt;br /&gt;
* pymox (Python)&lt;br /&gt;
* rr (Ruby)&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Mock Demo in Python ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11146</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11146"/>
		<updated>2023-01-24T00:16:29Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Mock(Python) Demo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
* Packages: unittest.mock (Python), org.mockito.Mockito(Java) and Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Mocking is a process used in unit testing when unit being tested has external dependencies.It creates mock objects (also known as replacement or dummy objects) that can be used in the simulation of real objects.The main purpose of this process is isolation of code being tested rather than concentrating on the behaviour or state of external dependencies.Mocking is normally required when components under test has dependencies which has no been implemented yet or if implementation is in progress (eg:REST APIs) or when components update system state(DB calls).&lt;br /&gt;
&lt;br /&gt;
Mocking makes use of three types of replacement objects: fakes, stubs and mocks. The fakes are used when you want to test the behavior of a class that has no dependencies. The stubs are used to test the behavior of a class that has dependencies.They will return results based on specific set of inputs and won&#039;t respond to something outside of what is programmed for the test. The mocks are advanced version of stubs which can also additionally modify behaviors like how many times method should be called, with what data and in which order.&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Mocking Frameworks are used to generate replacement objects like Stubs and Mocks,thereby complimenting Unit Testing Frameworks by isolating dependencies. But remember they are not replacement for unit testing frameworks and they should not be used to test the actual behavior of the software. Rather they are used to simulate or mock dependencies   especially to simulate external APIs and Databases in tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Advantages ====&lt;br /&gt;
* Tests can be isolated and thereby improving the test quality. It helps developers to write focused and concise unit tests.&lt;br /&gt;
&lt;br /&gt;
* It can also help to run tests faster and generate test data.&lt;br /&gt;
&lt;br /&gt;
==== Disadvantages ====&lt;br /&gt;
* Can lead to complex and difficult-to-understand tests if not used carefully.&lt;br /&gt;
&lt;br /&gt;
* Can also lead to writing tests that do not adequately reflect the actual behavior of the software.&lt;br /&gt;
&lt;br /&gt;
==== Frameworks in different programming languages ====&lt;br /&gt;
&lt;br /&gt;
* Mockito (Java)&lt;br /&gt;
* Moq (.NET)&lt;br /&gt;
* Mock (Python)&lt;br /&gt;
* EasyMock (Java)&lt;br /&gt;
* jMock (Java)&lt;br /&gt;
* Sinon.js(JS)&lt;br /&gt;
* pymox (Python)&lt;br /&gt;
* rr (Ruby)&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Mock Demo in Python ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11145</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11145"/>
		<updated>2023-01-24T00:15:47Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Frameworks in different programming languages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
* Packages: unittest.mock (Python), org.mockito.Mockito(Java) and Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Mocking is a process used in unit testing when unit being tested has external dependencies.It creates mock objects (also known as replacement or dummy objects) that can be used in the simulation of real objects.The main purpose of this process is isolation of code being tested rather than concentrating on the behaviour or state of external dependencies.Mocking is normally required when components under test has dependencies which has no been implemented yet or if implementation is in progress (eg:REST APIs) or when components update system state(DB calls).&lt;br /&gt;
&lt;br /&gt;
Mocking makes use of three types of replacement objects: fakes, stubs and mocks. The fakes are used when you want to test the behavior of a class that has no dependencies. The stubs are used to test the behavior of a class that has dependencies.They will return results based on specific set of inputs and won&#039;t respond to something outside of what is programmed for the test. The mocks are advanced version of stubs which can also additionally modify behaviors like how many times method should be called, with what data and in which order.&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Mocking Frameworks are used to generate replacement objects like Stubs and Mocks,thereby complimenting Unit Testing Frameworks by isolating dependencies. But remember they are not replacement for unit testing frameworks and they should not be used to test the actual behavior of the software. Rather they are used to simulate or mock dependencies   especially to simulate external APIs and Databases in tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Advantages ====&lt;br /&gt;
* Tests can be isolated and thereby improving the test quality. It helps developers to write focused and concise unit tests.&lt;br /&gt;
&lt;br /&gt;
* It can also help to run tests faster and generate test data.&lt;br /&gt;
&lt;br /&gt;
==== Disadvantages ====&lt;br /&gt;
* Can lead to complex and difficult-to-understand tests if not used carefully.&lt;br /&gt;
&lt;br /&gt;
* Can also lead to writing tests that do not adequately reflect the actual behavior of the software.&lt;br /&gt;
&lt;br /&gt;
==== Frameworks in different programming languages ====&lt;br /&gt;
&lt;br /&gt;
* Mockito (Java)&lt;br /&gt;
* Moq (.NET)&lt;br /&gt;
* Mock (Python)&lt;br /&gt;
* EasyMock (Java)&lt;br /&gt;
* jMock (Java)&lt;br /&gt;
* Sinon.js(JS)&lt;br /&gt;
* pymox (Python)&lt;br /&gt;
* rr (Ruby)&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Mock(Python) Demo ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11144</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11144"/>
		<updated>2023-01-24T00:10:33Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Frameworks in different programming languages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
* Packages: unittest.mock (Python), org.mockito.Mockito(Java) and Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Mocking is a process used in unit testing when unit being tested has external dependencies.It creates mock objects (also known as replacement or dummy objects) that can be used in the simulation of real objects.The main purpose of this process is isolation of code being tested rather than concentrating on the behaviour or state of external dependencies.Mocking is normally required when components under test has dependencies which has no been implemented yet or if implementation is in progress (eg:REST APIs) or when components update system state(DB calls).&lt;br /&gt;
&lt;br /&gt;
Mocking makes use of three types of replacement objects: fakes, stubs and mocks. The fakes are used when you want to test the behavior of a class that has no dependencies. The stubs are used to test the behavior of a class that has dependencies.They will return results based on specific set of inputs and won&#039;t respond to something outside of what is programmed for the test. The mocks are advanced version of stubs which can also additionally modify behaviors like how many times method should be called, with what data and in which order.&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Mocking Frameworks are used to generate replacement objects like Stubs and Mocks,thereby complimenting Unit Testing Frameworks by isolating dependencies. But remember they are not replacement for unit testing frameworks and they should not be used to test the actual behavior of the software. Rather they are used to simulate or mock dependencies   especially to simulate external APIs and Databases in tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Advantages ====&lt;br /&gt;
* Tests can be isolated and thereby improving the test quality. It helps developers to write focused and concise unit tests.&lt;br /&gt;
&lt;br /&gt;
* It can also help to run tests faster and generate test data.&lt;br /&gt;
&lt;br /&gt;
==== Disadvantages ====&lt;br /&gt;
* Can lead to complex and difficult-to-understand tests if not used carefully.&lt;br /&gt;
&lt;br /&gt;
* Can also lead to writing tests that do not adequately reflect the actual behavior of the software.&lt;br /&gt;
&lt;br /&gt;
==== Frameworks in different programming languages ====&lt;br /&gt;
&lt;br /&gt;
* Mockito (Java)&lt;br /&gt;
* Moq (.NET)&lt;br /&gt;
* Mock (Python)&lt;br /&gt;
* EasyMock (Java)&lt;br /&gt;
* jMock (Java)&lt;br /&gt;
* Sinon.js(JS)&lt;br /&gt;
* pymox (Python)&lt;br /&gt;
* rr (Ruby)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11143</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11143"/>
		<updated>2023-01-24T00:09:42Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Disadvantages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
* Packages: unittest.mock (Python), org.mockito.Mockito(Java) and Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Mocking is a process used in unit testing when unit being tested has external dependencies.It creates mock objects (also known as replacement or dummy objects) that can be used in the simulation of real objects.The main purpose of this process is isolation of code being tested rather than concentrating on the behaviour or state of external dependencies.Mocking is normally required when components under test has dependencies which has no been implemented yet or if implementation is in progress (eg:REST APIs) or when components update system state(DB calls).&lt;br /&gt;
&lt;br /&gt;
Mocking makes use of three types of replacement objects: fakes, stubs and mocks. The fakes are used when you want to test the behavior of a class that has no dependencies. The stubs are used to test the behavior of a class that has dependencies.They will return results based on specific set of inputs and won&#039;t respond to something outside of what is programmed for the test. The mocks are advanced version of stubs which can also additionally modify behaviors like how many times method should be called, with what data and in which order.&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Mocking Frameworks are used to generate replacement objects like Stubs and Mocks,thereby complimenting Unit Testing Frameworks by isolating dependencies. But remember they are not replacement for unit testing frameworks and they should not be used to test the actual behavior of the software. Rather they are used to simulate or mock dependencies   especially to simulate external APIs and Databases in tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Advantages ====&lt;br /&gt;
* Tests can be isolated and thereby improving the test quality. It helps developers to write focused and concise unit tests.&lt;br /&gt;
&lt;br /&gt;
* It can also help to run tests faster and generate test data.&lt;br /&gt;
&lt;br /&gt;
==== Disadvantages ====&lt;br /&gt;
* Can lead to complex and difficult-to-understand tests if not used carefully.&lt;br /&gt;
&lt;br /&gt;
* Can also lead to writing tests that do not adequately reflect the actual behavior of the software.&lt;br /&gt;
&lt;br /&gt;
==== Frameworks in different programming languages ====&lt;br /&gt;
&lt;br /&gt;
* Mockito (Java)&lt;br /&gt;
&lt;br /&gt;
* Moq (.NET)&lt;br /&gt;
&lt;br /&gt;
* Mock (Python)&lt;br /&gt;
&lt;br /&gt;
* EasyMock (Java)&lt;br /&gt;
&lt;br /&gt;
* jMock (Java)&lt;br /&gt;
* Sinon.js(JS)&lt;br /&gt;
* pymox (Python)&lt;br /&gt;
* rr (Ruby)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11142</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11142"/>
		<updated>2023-01-24T00:07:04Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Mocking Frameworks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
* Packages: unittest.mock (Python), org.mockito.Mockito(Java) and Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Mocking is a process used in unit testing when unit being tested has external dependencies.It creates mock objects (also known as replacement or dummy objects) that can be used in the simulation of real objects.The main purpose of this process is isolation of code being tested rather than concentrating on the behaviour or state of external dependencies.Mocking is normally required when components under test has dependencies which has no been implemented yet or if implementation is in progress (eg:REST APIs) or when components update system state(DB calls).&lt;br /&gt;
&lt;br /&gt;
Mocking makes use of three types of replacement objects: fakes, stubs and mocks. The fakes are used when you want to test the behavior of a class that has no dependencies. The stubs are used to test the behavior of a class that has dependencies.They will return results based on specific set of inputs and won&#039;t respond to something outside of what is programmed for the test. The mocks are advanced version of stubs which can also additionally modify behaviors like how many times method should be called, with what data and in which order.&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Mocking Frameworks are used to generate replacement objects like Stubs and Mocks,thereby complimenting Unit Testing Frameworks by isolating dependencies. But remember they are not replacement for unit testing frameworks and they should not be used to test the actual behavior of the software. Rather they are used to simulate or mock dependencies   especially to simulate external APIs and Databases in tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Advantages ====&lt;br /&gt;
* Tests can be isolated and thereby improving the test quality. It helps developers to write focused and concise unit tests.&lt;br /&gt;
&lt;br /&gt;
* It can also help to run tests faster and generate test data.&lt;br /&gt;
&lt;br /&gt;
==== Disadvantages ====&lt;br /&gt;
* Can lead to complex and difficult-to-understand tests if not used carefully.&lt;br /&gt;
&lt;br /&gt;
* Can also lead to writing tests that do not adequately reflect the actual behavior of the software.&lt;br /&gt;
&lt;br /&gt;
==== Frameworks in different programming languages&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
•	Mockito (Java)&lt;br /&gt;
&lt;br /&gt;
•	Moq (.NET)&lt;br /&gt;
&lt;br /&gt;
•	Mock (Python)&lt;br /&gt;
&lt;br /&gt;
•	EasyMock (Java)&lt;br /&gt;
&lt;br /&gt;
•	jMock (Java)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11141</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11141"/>
		<updated>2023-01-24T00:03:44Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Advantages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
* Packages: unittest.mock (Python), org.mockito.Mockito(Java) and Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Mocking is a process used in unit testing when unit being tested has external dependencies.It creates mock objects (also known as replacement or dummy objects) that can be used in the simulation of real objects.The main purpose of this process is isolation of code being tested rather than concentrating on the behaviour or state of external dependencies.Mocking is normally required when components under test has dependencies which has no been implemented yet or if implementation is in progress (eg:REST APIs) or when components update system state(DB calls).&lt;br /&gt;
&lt;br /&gt;
Mocking makes use of three types of replacement objects: fakes, stubs and mocks. The fakes are used when you want to test the behavior of a class that has no dependencies. The stubs are used to test the behavior of a class that has dependencies.They will return results based on specific set of inputs and won&#039;t respond to something outside of what is programmed for the test. The mocks are advanced version of stubs which can also additionally modify behaviors like how many times method should be called, with what data and in which order.&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Mocking Frameworks are used to generate replacement objects like Stubs and Mocks,thereby complimenting Unit Testing Frameworks by isolating dependencies. But remember they are not replacement for unit testing frameworks and they should not be used to test the actual behavior of the software. Rather they are used to simulate or mock dependencies   especially external APIs and Databases in tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Advantages ====&lt;br /&gt;
* Tests can be isolated and thereby improving the test quality. It helps developers to write focused and concise unit tests.&lt;br /&gt;
&lt;br /&gt;
* It can also help to run tests faster and generate test data.&lt;br /&gt;
&lt;br /&gt;
==== Disadvantages ====&lt;br /&gt;
* Can lead to complex and difficult-to-understand tests if not used carefully.&lt;br /&gt;
&lt;br /&gt;
* Can also lead to writing tests that do not adequately reflect the actual behavior of the software.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11140</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11140"/>
		<updated>2023-01-24T00:02:26Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Mocking Frameworks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
* Packages: unittest.mock (Python), org.mockito.Mockito(Java) and Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Mocking is a process used in unit testing when unit being tested has external dependencies.It creates mock objects (also known as replacement or dummy objects) that can be used in the simulation of real objects.The main purpose of this process is isolation of code being tested rather than concentrating on the behaviour or state of external dependencies.Mocking is normally required when components under test has dependencies which has no been implemented yet or if implementation is in progress (eg:REST APIs) or when components update system state(DB calls).&lt;br /&gt;
&lt;br /&gt;
Mocking makes use of three types of replacement objects: fakes, stubs and mocks. The fakes are used when you want to test the behavior of a class that has no dependencies. The stubs are used to test the behavior of a class that has dependencies.They will return results based on specific set of inputs and won&#039;t respond to something outside of what is programmed for the test. The mocks are advanced version of stubs which can also additionally modify behaviors like how many times method should be called, with what data and in which order.&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Mocking Frameworks are used to generate replacement objects like Stubs and Mocks,thereby complimenting Unit Testing Frameworks by isolating dependencies. But remember they are not replacement for unit testing frameworks and they should not be used to test the actual behavior of the software. Rather they are used to simulate or mock dependencies   especially external APIs and Databases in tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Advantages ====&lt;br /&gt;
* Tests can be isolated and thus improve the test quality. It helps developers to write focused and concise unit tests.&lt;br /&gt;
&lt;br /&gt;
* It can also help to run tests faster and generate test data.&lt;br /&gt;
&lt;br /&gt;
==== Disadvantages ====&lt;br /&gt;
* Can lead to complex and difficult-to-understand tests if not used carefully.&lt;br /&gt;
&lt;br /&gt;
* Can also lead to writing tests that do not adequately reflect the actual behavior of the software.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11139</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11139"/>
		<updated>2023-01-23T23:56:55Z</updated>

		<summary type="html">&lt;p&gt;JJermias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
* Packages: unittest.mock (Python), org.mockito.Mockito(Java) and Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Mocking is a process used in unit testing when unit being tested has external dependencies.It creates mock objects (also known as replacement or dummy objects) that can be used in the simulation of real objects.The main purpose of this process is isolation of code being tested rather than concentrating on the behaviour or state of external dependencies.Mocking is normally required when components under test has dependencies which has no been implemented yet or if implementation is in progress (eg:REST APIs) or when components update system state(DB calls).&lt;br /&gt;
&lt;br /&gt;
Mocking makes use of three types of replacement objects: fakes, stubs and mocks. The fakes are used when you want to test the behavior of a class that has no dependencies. The stubs are used to test the behavior of a class that has dependencies.They will return results based on specific set of inputs and won&#039;t respond to something outside of what is programmed for the test. The mocks are advanced version of stubs which can also additionally modify behaviors like how many times method should be called, with what data and in which order.&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Mocking Frameworks are used to generate replacement objects like Stubs and Mocks,thereby complimenting Unit Testing Frameworks by isolating dependencies. But remember they are not replacement for unit testing frameworks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Advantages ====&lt;br /&gt;
* Tests can be isolated and thus improve the test quality. It helps developers to write focused and concise unit tests.&lt;br /&gt;
&lt;br /&gt;
* It can also help to run tests faster and generate test data.&lt;br /&gt;
&lt;br /&gt;
==== Disadvantages ====&lt;br /&gt;
* Can lead to complex and difficult-to-understand tests if not used carefully.&lt;br /&gt;
&lt;br /&gt;
* Can also lead to writing tests that do not adequately reflect the actual behavior of the software.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11138</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11138"/>
		<updated>2023-01-23T23:50:54Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Mocking Frameworks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
* Packages: unittest.mock (Python), org.mockito.Mockito(Java) and Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Mocking is a process used in unit testing when unit being tested has external dependencies.It creates mock objects (also known as replacement or dummy objects) that can be used in the simulation of real objects.The main purpose of this process is isolation of code being tested rather than concentrating on the behaviour or state of external dependencies.Mocking is normally required when components under test has dependencies which has no been implemented yet or if implementation is in progress (eg:REST APIs) or when components update system state(DB calls).&lt;br /&gt;
&lt;br /&gt;
Mocking makes use of three types of replacement objects: fakes, stubs and mocks. The fakes are used when you want to test the behavior of a class that has no dependencies. The stubs are used to test the behavior of a class that has dependencies.They will return results based on specific set of inputs and won&#039;t respond to something outside of what is programmed for the test. The mocks are advanced version of stubs which can also additionally modify behaviors like how many times method should be called, with what data and in which order.&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Mocking Frameworks are used to generate replacement objects like Stubs and Mocks,thereby complimenting Unit Testing Frameworks by isolating dependencies. But remember they are not replacement for unit testing frameworks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Advantages ====&lt;br /&gt;
* Tests can be isolated and thus improve the test quality. It helps developers to write focused and concise unit tests.&lt;br /&gt;
&lt;br /&gt;
* It can also help to run tests faster and generate test data.&lt;br /&gt;
&lt;br /&gt;
==== Disadvantages ====&lt;br /&gt;
* &lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
[[Device to be used with this documentation]]&lt;br /&gt;
[[Maybe another device to be used with this documentation]]&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[A course where this documentation was used]] (2017, 2018)&lt;br /&gt;
* [[Another one]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11137</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11137"/>
		<updated>2023-01-23T23:35:40Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Mocking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
* Packages: unittest.mock (Python), org.mockito.Mockito(Java) and Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Mocking is a process used in unit testing when unit being tested has external dependencies.It creates mock objects (also known as replacement or dummy objects) that can be used in the simulation of real objects.The main purpose of this process is isolation of code being tested rather than concentrating on the behaviour or state of external dependencies.Mocking is normally required when components under test has dependencies which has no been implemented yet or if implementation is in progress (eg:REST APIs) or when components update system state(DB calls).&lt;br /&gt;
&lt;br /&gt;
Mocking makes use of three types of replacement objects: fakes, stubs and mocks. The fakes are used when you want to test the behavior of a class that has no dependencies. The stubs are used to test the behavior of a class that has dependencies.They will return results based on specific set of inputs and won&#039;t respond to something outside of what is programmed for the test. The mocks are advanced version of stubs which can also additionally modify behaviors like how many times method should be called, with what data and in which order.&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Make sure to read&lt;br /&gt;
&lt;br /&gt;
* War and Peace&lt;br /&gt;
* Lord of the Rings&lt;br /&gt;
* The Baroque Cycle&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
[[Device to be used with this documentation]]&lt;br /&gt;
[[Maybe another device to be used with this documentation]]&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[A course where this documentation was used]] (2017, 2018)&lt;br /&gt;
* [[Another one]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11136</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11136"/>
		<updated>2023-01-23T23:30:51Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Mocking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
* Packages: unittest.mock (Python), org.mockito.Mockito(Java) and Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Mocking is a process used in unit testing when unit being tested has external dependencies.It creates mock objects (also known as replacement or dummy objects) that can be used in the simulation of real objects.The main purpose of this process is isolation of code being tested rather than concentrating on the behaviour or state of external dependencies.Mocking is normally required when components under test has dependencies which has no been implemented yet or if implementation is in progress (eg:REST APIs) or when components update system state(DB calls).&lt;br /&gt;
&lt;br /&gt;
Mocking make use of three types of replacement objects: fakes, stubs and mocks. The fakes are used when you want to test the behavior of a class that has no dependencies. The stubs are used to test the behavior of a class that has dependencies and they won&#039;t respond to something outside of what is programmed for the test. The mocks are advanced version of stubs which will return values like stub and additionally modify behaviors like how many times method should be called, with what data and in which order.&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Make sure to read&lt;br /&gt;
&lt;br /&gt;
* War and Peace&lt;br /&gt;
* Lord of the Rings&lt;br /&gt;
* The Baroque Cycle&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
[[Device to be used with this documentation]]&lt;br /&gt;
[[Maybe another device to be used with this documentation]]&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[A course where this documentation was used]] (2017, 2018)&lt;br /&gt;
* [[Another one]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11135</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11135"/>
		<updated>2023-01-23T23:17:02Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Mocking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
* Packages: unittest.mock (Python), org.mockito.Mockito(Java) and Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Mocking is a process used in unit testing when unit being tested has external dependencies.It creates mock objects (also known as replacement or dummy objects) that can be used in the simulation of real objects.The main purpose of this process is isolation of code being tested rather than concentrating on the behaviour or state of external dependencies.Mocking is normally required &lt;br /&gt;
a) when components under test has dependencies which has no been implemented yet or if implementation is in progress (eg:REST APIs) or &lt;br /&gt;
b) when components update system state(DB calls).&lt;br /&gt;
&lt;br /&gt;
Mocking comes in three flavors: fakes, stubs and mocks. The fakes are the simplest. They are used when you want to test the behavior of a class that has no dependencies. The stubs are used when you want to test the behavior of a class that has dependencies and you do not want to change the behavior. The mocks are used when you want to test the behavior of a class that has dependencies and potentially modify behaviors.&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Make sure to read&lt;br /&gt;
&lt;br /&gt;
* War and Peace&lt;br /&gt;
* Lord of the Rings&lt;br /&gt;
* The Baroque Cycle&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
[[Device to be used with this documentation]]&lt;br /&gt;
[[Maybe another device to be used with this documentation]]&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[A course where this documentation was used]] (2017, 2018)&lt;br /&gt;
* [[Another one]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11134</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11134"/>
		<updated>2023-01-23T23:12:31Z</updated>

		<summary type="html">&lt;p&gt;JJermias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
* Packages: unittest.mock (Python), org.mockito.Mockito(Java) and Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Mocking is a process used in unit testing when unit being tested has external dependencies.It creates mock objects (also known as replacement or dummy objects) that can be used in the simulation of real objects.The main purpose of this process is isolation code for testing rather than concentrating on the behaviour or state of external dependencies.Mocking comes in three flavors: fakes, stubs and mocks. The fakes are the simplest. They are used when you want to test the behavior of a class that has no dependencies. The stubs are used when you want to test the behavior of a class that has dependencies and you do not want to change the behavior. The mocks are used when you want to test the behavior of a class that has dependencies and potentially modify behaviors.&lt;br /&gt;
&lt;br /&gt;
Mocking is normally required when components under test has dependencies which has no been implemented yet or if implementation is in progress (eg:REST APIs) or when components update system state(DB calls).&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Make sure to read&lt;br /&gt;
&lt;br /&gt;
* War and Peace&lt;br /&gt;
* Lord of the Rings&lt;br /&gt;
* The Baroque Cycle&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
[[Device to be used with this documentation]]&lt;br /&gt;
[[Maybe another device to be used with this documentation]]&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[A course where this documentation was used]] (2017, 2018)&lt;br /&gt;
* [[Another one]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11133</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11133"/>
		<updated>2023-01-23T23:08:46Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Mocking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
* Packages: unittest.mock (Python), org.mockito.Mockito(Java) and Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Mocking is a process used in unit testing when unit being tested has external dependencies.It creates mock objects (also known as replacement or dummy objects) that can be used in the simulation of real objects.The main purpose of this process is isolation code for testing rather than concentrating on the behaviour or state of external dependencies.Mocking comes in three flavors: fakes, stubs and mocks. The fakes are the simplest. They are used when you want to test the behavior of a class that has no dependencies. The stubs are used when you want to test the behavior of a class that has dependencies and you do not want to change the behavior. The mocks are used when you want to test the behavior of a class that has dependencies and potentially modify behaviors.&lt;br /&gt;
Mocking is normally required when components under test has dependencies with no implementation or with implementation in progress(eg:REST APIs) or when components update system state(DB calls).&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Make sure to read&lt;br /&gt;
&lt;br /&gt;
* War and Peace&lt;br /&gt;
* Lord of the Rings&lt;br /&gt;
* The Baroque Cycle&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
[[Device to be used with this documentation]]&lt;br /&gt;
[[Maybe another device to be used with this documentation]]&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[A course where this documentation was used]] (2017, 2018)&lt;br /&gt;
* [[Another one]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11132</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11132"/>
		<updated>2023-01-23T22:37:34Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
* Packages: unittest.mock (Python), org.mockito.Mockito(Java) and Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Enter these commands in the shell&lt;br /&gt;
&lt;br /&gt;
 echo foo&lt;br /&gt;
 echo bar&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Make sure to read&lt;br /&gt;
&lt;br /&gt;
* War and Peace&lt;br /&gt;
* Lord of the Rings&lt;br /&gt;
* The Baroque Cycle&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
[[Device to be used with this documentation]]&lt;br /&gt;
[[Maybe another device to be used with this documentation]]&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[A course where this documentation was used]] (2017, 2018)&lt;br /&gt;
* [[Another one]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11131</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11131"/>
		<updated>2023-01-23T22:37:06Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
* Packages: unittest.mock (Python), org.mockito.Mockito(Java) and Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must have followed [[Some Other Documentation]] before.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Enter these commands in the shell&lt;br /&gt;
&lt;br /&gt;
 echo foo&lt;br /&gt;
 echo bar&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Make sure to read&lt;br /&gt;
&lt;br /&gt;
* War and Peace&lt;br /&gt;
* Lord of the Rings&lt;br /&gt;
* The Baroque Cycle&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
[[Device to be used with this documentation]]&lt;br /&gt;
[[Maybe another device to be used with this documentation]]&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[A course where this documentation was used]] (2017, 2018)&lt;br /&gt;
* [[Another one]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11130</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11130"/>
		<updated>2023-01-23T22:35:51Z</updated>

		<summary type="html">&lt;p&gt;JJermias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
* Packages: unittest.mock (Python)&lt;br /&gt;
org.mockito.Mockito(Java)&lt;br /&gt;
Moq(.NET)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must have followed [[Some Other Documentation]] before.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Mocking ===&lt;br /&gt;
&lt;br /&gt;
Enter these commands in the shell&lt;br /&gt;
&lt;br /&gt;
 echo foo&lt;br /&gt;
 echo bar&lt;br /&gt;
&lt;br /&gt;
=== Mocking Frameworks ===&lt;br /&gt;
&lt;br /&gt;
Make sure to read&lt;br /&gt;
&lt;br /&gt;
* War and Peace&lt;br /&gt;
* Lord of the Rings&lt;br /&gt;
* The Baroque Cycle&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
[[Device to be used with this documentation]]&lt;br /&gt;
[[Maybe another device to be used with this documentation]]&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[A course where this documentation was used]] (2017, 2018)&lt;br /&gt;
* [[Another one]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11129</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11129"/>
		<updated>2023-01-23T22:03:16Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: Ubuntu 18.04 bionic amd64&lt;br /&gt;
* Packages: git emacs&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must have followed [[Some Other Documentation]] before.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1 ===&lt;br /&gt;
&lt;br /&gt;
Enter these commands in the shell&lt;br /&gt;
&lt;br /&gt;
 echo foo&lt;br /&gt;
 echo bar&lt;br /&gt;
&lt;br /&gt;
=== Step 2 ===&lt;br /&gt;
&lt;br /&gt;
Make sure to read&lt;br /&gt;
&lt;br /&gt;
* War and Peace&lt;br /&gt;
* Lord of the Rings&lt;br /&gt;
* The Baroque Cycle&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
[[Device to be used with this documentation]]&lt;br /&gt;
[[Maybe another device to be used with this documentation]]&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[A course where this documentation was used]] (2017, 2018)&lt;br /&gt;
* [[Another one]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://de.wikipedia.org/wiki/Mocking_Framework&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11128</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11128"/>
		<updated>2023-01-23T21:57:41Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks with their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: Ubuntu 18.04 bionic amd64&lt;br /&gt;
* Packages: git emacs&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must have followed [[Some Other Documentation]] before.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1 ===&lt;br /&gt;
&lt;br /&gt;
Enter these commands in the shell&lt;br /&gt;
&lt;br /&gt;
 echo foo&lt;br /&gt;
 echo bar&lt;br /&gt;
&lt;br /&gt;
=== Step 2 ===&lt;br /&gt;
&lt;br /&gt;
Make sure to read&lt;br /&gt;
&lt;br /&gt;
* War and Peace&lt;br /&gt;
* Lord of the Rings&lt;br /&gt;
* The Baroque Cycle&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
[[Device to be used with this documentation]]&lt;br /&gt;
[[Maybe another device to be used with this documentation]]&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[A course where this documentation was used]] (2017, 2018)&lt;br /&gt;
* [[Another one]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://wikipedia.org&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11127</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11127"/>
		<updated>2023-01-23T21:55:52Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking and Mocking Frameworks and their usages, advantages and disadvantages. Also, some code examples showing mock testing demo using Frameworks like Mock(Python), Mockito(Java) and Moq(.NET) are also given.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: Ubuntu 18.04 bionic amd64&lt;br /&gt;
* Packages: git emacs&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must have followed [[Some Other Documentation]] before.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1 ===&lt;br /&gt;
&lt;br /&gt;
Enter these commands in the shell&lt;br /&gt;
&lt;br /&gt;
 echo foo&lt;br /&gt;
 echo bar&lt;br /&gt;
&lt;br /&gt;
=== Step 2 ===&lt;br /&gt;
&lt;br /&gt;
Make sure to read&lt;br /&gt;
&lt;br /&gt;
* War and Peace&lt;br /&gt;
* Lord of the Rings&lt;br /&gt;
* The Baroque Cycle&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
[[Device to be used with this documentation]]&lt;br /&gt;
[[Maybe another device to be used with this documentation]]&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[A course where this documentation was used]] (2017, 2018)&lt;br /&gt;
* [[Another one]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://wikipedia.org&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11126</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11126"/>
		<updated>2023-01-23T21:23:27Z</updated>

		<summary type="html">&lt;p&gt;JJermias: /* Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This document gives basic insights about Mocking Frameworks and their usages in making Unit Testing look easier.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: Ubuntu 18.04 bionic amd64&lt;br /&gt;
* Packages: git emacs&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must have followed [[Some Other Documentation]] before.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1 ===&lt;br /&gt;
&lt;br /&gt;
Enter these commands in the shell&lt;br /&gt;
&lt;br /&gt;
 echo foo&lt;br /&gt;
 echo bar&lt;br /&gt;
&lt;br /&gt;
=== Step 2 ===&lt;br /&gt;
&lt;br /&gt;
Make sure to read&lt;br /&gt;
&lt;br /&gt;
* War and Peace&lt;br /&gt;
* Lord of the Rings&lt;br /&gt;
* The Baroque Cycle&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
[[Device to be used with this documentation]]&lt;br /&gt;
[[Maybe another device to be used with this documentation]]&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[A course where this documentation was used]] (2017, 2018)&lt;br /&gt;
* [[Another one]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://wikipedia.org&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11125</id>
		<title>Mocking Frameworks</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Mocking_Frameworks&amp;diff=11125"/>
		<updated>2023-01-23T21:21:06Z</updated>

		<summary type="html">&lt;p&gt;JJermias: This documentation gives basic insights about Mocking Frameworks and their usages in making Unit Testing look easier.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
Description what this documentation is about.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: Ubuntu 18.04 bionic amd64&lt;br /&gt;
* Packages: git emacs&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must have followed [[Some Other Documentation]] before.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1 ===&lt;br /&gt;
&lt;br /&gt;
Enter these commands in the shell&lt;br /&gt;
&lt;br /&gt;
 echo foo&lt;br /&gt;
 echo bar&lt;br /&gt;
&lt;br /&gt;
=== Step 2 ===&lt;br /&gt;
&lt;br /&gt;
Make sure to read&lt;br /&gt;
&lt;br /&gt;
* War and Peace&lt;br /&gt;
* Lord of the Rings&lt;br /&gt;
* The Baroque Cycle&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
[[Device to be used with this documentation]]&lt;br /&gt;
[[Maybe another device to be used with this documentation]]&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[A course where this documentation was used]] (2017, 2018)&lt;br /&gt;
* [[Another one]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://wikipedia.org&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JJermias</name></author>
	</entry>
</feed>