• Stars
    star
    158
  • Rank 237,131 (Top 5 %)
  • Language
    C#
  • License
    Apache License 2.0
  • Created about 11 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Powerful and free mocking for .NET

JustMock Lite

nuget license

JustMock Lite by Telerik is for developers who practice unit testing and want to deliver exceptional software. JustMock Lite is the superior free mocking framework that makes unit testing simpler for SOLID testable projects. It is also an open source product that is easy to use, feature rich, with great power and flexibility, making it the superior choice. JustMock Lite cuts your development time and helps you create better unit tests. It enables you to perform fast and controlled tests that are independent of external dependencies like databases, web services or proprietary code. For more information, refer to our JustMock Lite website.

JustMock Lite Key Features

  • AAA pattern – JustMockLite uses the Arrange Act Assert (AAA) pattern.
  • Error-Free Mocking - Thanks to its strongly typed framework API, JustMock detects errors in your mock definitions and highlights them in Visual Studio. The JustMock Lite API fully leverages Visual Studio IntelliSense to make it easy to start mocking.
  • Mock interfaces - Allows you to test public interfaces.
  • Mock classes - Allows you to test public classes.
  • Mock properties - Allows you to test the property getter and setter.
  • Mock and rise events - Allows you to test events.
  • Control mock behavior - Allows you to control the default behavior of a mock whether be to do nothing, call the original code or throw an exception.
  • Assert call occurrences - Allows you to determine how many times a call has occurred.
  • Recursive mocking - Еnable you to mock members that are obtained as a result of "chained" calls on a mock.
  • Sequential mocking - Allows you to return different values on the same or different consecutive calls to one and the same type.
  • Support for out/ref - Mock methods accepting our and ref parameters.
  • Support for Generics - Mock generic classes and methods.
  • Fluent mocking - Allows you setup your test arrangements and expectations from your mock object.
  • Being able to seamlessly upgrade to JustMock - No rework of test is required. Simply install JustMock and make sure your project is referencing the correct assemblies.
  • And many more.

JustMock

JustMock Lite is backed by a commercial version JustMock which is more advanced mocking framework based on JustMock Lite. JustMock is for developers who doesn't want to have any restrictions and be able to mock literally everything. For more information visit our JustMock website.

JustMock Key Features

  • All key features from JustMock Lite
  • Mock non-public members and types - Allows you to mock non-public members or types.
  • Mock non-virtual methods - Allows you to mock non-virtual methods.
  • Mock extension method - Allows you to mock extension methods.
  • Mock static classes, methods, and properties - Allows you to mock static constructors, methods and properties getters and setters, set expectations and verify results.
  • Mock sealed classes - Allows you to mock sealed classes and calls to their methods/properties
  • Mock partial mocking - Allows you keep your original object and mock only the required methods.
  • Mock LINQ queries - Allows you to mock LINQ queries with custom select.
  • Mock DLL imports - Allows you to mock imported functions (decorated with the [DLLImport()] attribute)
  • Mock Ref return values and ref locals - Allows you to arrange and verify Ref return and Ref locals
  • Mock Local functions - Allows you mock Local functions.
  • Mock MsCorLib members - Allows you to mock types and methods from .NET Framework/.NET Core, i.e. from MsCorLib.
  • Mock Microsoft SharePoint - Allows you to mock types and method from SharePoint.
  • Mock Microsoft EntityFramework - Allows you to easily create in-memory mocks of the DbSet and DbContext types.
  • And many more

Examples

[TestMethod]
public void TestBookService()
{
    // Arrange - initialize objects and prepare data.
    var repository = Mock.Create<IBookRepository>();
    var expectedBook = new Book { Title = "Adventures" };
    var service = new BookService(repository);
    
    // prepare an expectation of what the GetWhere method should do when called with the specified parameters
    // and how many times the call is supposed to occur.
    Mock.Arrange(() => repository.GetWhere(book => book.Id == 1)).Returns(expectedBook).OccursOnce();

    // Act - execute the tested logic.
    Book actualBook = service.GetSingleBook(1);

    // Assert - verify that the actual result is equal to the expected.
    Assert.AreEqual(expectedBook.Title, actualBook.Title);
}

Supported Frameworks

  • .Net Framework 4.5+ and later.
  • .NET 5, .NET 6 preview 2
  • .Net Core 2.0 and later.

Documentation

JustMock Lite and JustMock are coming with extensive Documentation and examples that will help you quickly get started with the framework.

Feedback

JustMock Lite is constantly improved through customer interaction and feedback. If you want to suggest a new feature, bug report or vote for a popular one, please visit our Feedback Portal.

Happy mocking!

More Repositories

1

kendo-ui-core

An HTML5, jQuery-based widget library for building modern web apps.
JavaScript
2,504
star
2

JustDecompileEngine

The decompilation engine of JustDecompile
C#
1,341
star
3

UI-For-UWP

This repo contains the source code for Telerik UI for Universal Windows Platform (UWP), which includes 20+ UI controls for developers building UWP applications.
C#
1,158
star
4

xaml-sdk

The XAML SDK is an easy-to-use infrastructure with 1000+ developer focused examples for most of the Telerik WPF and Silverlight controls.
C#
450
star
5

kendo-angular

Issue tracker - Kendo UI for Angular
TypeScript
444
star
6

JustAssembly

Assembly Diff and Analysis Tool
C#
363
star
7

blazor-ui

A collection of examples related to Telerik UI for Blazor Components: https://www.telerik.com/blazor-ui
C#
334
star
8

ui-for-aspnet-mvc-examples

A collection of Telerik UI for ASP.NET MVC examples
CSS
318
star
9

razor-converter

Tool for converting WebForms Views to Razor (C# Only)
C#
235
star
10

kendo-react

Issue tracker - KendoReact http://www.telerik.com/kendo-react-ui/
HTML
211
star
11

kendo-examples-asp-net-mvc

Kendo UI Examples for ASP.NET MVC
JavaScript
165
star
12

kendo-themes

Monorepo for SASS-based Kendo UI themes
HTML
148
star
13

Android-samples

This repository is used to store all controls' samples for the Telerik UI for Android suite.
Java
146
star
14

kendo-ui-demos-service

Back-end service used for the Kendo UI Online Demos
C#
112
star
15

ui-for-aspnet-core-examples

A collection of Telerik UI for ASP.NET Core components examples
C#
110
star
16

telerik-xamarin-forms-samples

Repo contraining source for Telerik UI for Xamarin showcase apps
C#
98
star
17

kendoui-northwind-dashboard

A dashboard for Northwind built with Telerik UI for ASP.NET MVC.
JavaScript
96
star
18

justdecompile-plugins

C#
91
star
19

maui-samples

Repo containing source for Telerik UI for .NET MAUI showcase apps
90
star
20

kendo-bootstrap-demo

HTML
89
star
21

kendo-examples-asp-net

C#
88
star
22

fiddler-core-demos

Sample applications demonstrating usages of Progress® Telerik® FiddlerCore Embedded Engine.
C#
73
star
23

fiddler-docs

Official documentation for Fiddler Classic - the community-trusted free Windows-only tool that logs HTTP(s) network traffic.
Ruby
73
star
24

ng2-dashboard

Kendo UI for Angular w/NativeScript - Dashboard
TypeScript
65
star
25

kendo-vue

Issue tracker - Kendo UI for Vue http://www.telerik.com/kendo-vue-ui/
CSS
63
star
26

blazor-docs

Public Documentation for Telerik UI for Blazor components.
JavaScript
53
star
27

ios-sdk

Contains iOS controls SDK examples
Objective-C
51
star
28

xaml-docs

Public Documentation for Telerik UI for WPF and Silverlight
JavaScript
51
star
29

kendo-angular-quickstart-cli

Using Kendo UI with the Angular CLI
TypeScript
41
star
30

blazing-coffee

A fully featured Blazor WebAssembly Demo showcasing the Telerik UI for Blazor components
C#
39
star
31

xamarin-forms-sdk

The Xamarin.Forms SDK is an easy-to-use infrastructure with many developer focused examples for the UI for Xamarin controls.
C#
36
star
32

document-processing-sdk

The Document Processing SDK is an easy-to-use infrastructure containing developer focused examples for the libraries included in Telerik Document Processing.
C#
33
star
33

kendo-react-finance-portfolio

React Stock Watchlist App
TypeScript
31
star
34

winforms-docs

This repository contains the content for the Telerik UI for WinForms documentation.
JavaScript
31
star
35

platform-friends-hybrid

A full-featured social demo app that shows how to integrate a wide range of Telerik Platform services into a Hybrid mobile application.
JavaScript
30
star
36

kendo-ux

UX assets for Kendo UI
HTML
28
star
37

react-coffee-warehouse

JavaScript
27
star
38

blazor-ui-messages

Localization messages for Telerik UI for Blazor components: https://www.telerik.com/blazor-ui
26
star
39

kendo-theme-bootstrap

Kendo UI theme, based on Bootstrap v4
CSS
25
star
40

blazor-dashboard

Blazor sample dashboard app with native components from Telerik
23
star
41

ajax-docs

Public Documentation for Telerik UI for ASP.NET AJAX
C#
23
star
42

web-mail-sample-app-mvc

This is the WebMail MVC sample app
JavaScript
21
star
43

blazor-stocks

Blazor PWA sample app - My Stocks
20
star
44

winforms-sdk

C#
19
star
45

nativescript-cloud

Used for cloud support in NativeScript CLI
TypeScript
18
star
46

kendo-angular-universal-demo

Sample Angular 2 Universal Application with Kendo UI for Angular 2
TypeScript
17
star
47

UI-For-UWP-Demos

The UI for UWP Demos application demonstrates a great number of user case scenarios using Telerik UI for Universal Windows Platform (UWP) - a suite which includes 20+ UI controls for developers building UWP applications. http://www.telerik.com/uwp/
C#
17
star
48

kendo-theme-default

The default, SCSS-based theme for Kendo UI
CSS
16
star
49

kendo-react-build-a-sales-dashboard

Source code for Telerik.com blog article: "Let's Build a Sales Dashboard with React"
JavaScript
16
star
50

xamarin-forms-docs

This repository holds documentation for Xamarin Forms components
JavaScript
16
star
51

platform-friends-web

A full-featured social demo app that shows how to integrate a wide range of Telerik Platform services into a web application.
JavaScript
16
star
52

fiddler-core-docs

FiddlerCore is a .NET class library you can integrate into your .NET applications. FiddlerCore allows you to capture and modify HTTP and HTTPS traffic just like Fiddler, without any of the Fiddler UI.
CSS
15
star
53

fiddler-everywhere-docs

Fiddler Everywhere is a high-performance, cross-platform web debugging proxy for any browser, system or platform. It is a web debugging tool that logs all HTTP(S) traffic between your computer and the Internet. It inspects and edits traffic, issue requests, and fiddle with incoming and outgoing data.
Shell
15
star
54

scaffold-templates-core

Those templates are to be used with the built-in scaffold mechanism in ASP.NET Core.
HTML
14
star
55

admin-dashboard-sample-app-jquery

HTML
14
star
56

kendo-intl

Kendo UI Internationalization
JavaScript
14
star
57

kendo-ui-npm-example

A preview of the Kendo UI Core NPM package usage
JavaScript
14
star
58

vue-dashboard

Kendo UI Vue.js wrappers dashboard with Git Issues, live at
Vue
14
star
59

aspnet-sdk

Telerik UI for ASP.NET AJAX allows you to build Web Forms web sites and apps for any browser and device in half the time
C#
14
star
60

reporting-samples

C#
13
star
61

core-bootstrap-demo

HTML
12
star
62

mobile-cli-lib

Contains common infrastructure for CLIs - mainly AppBuilder, NativeScript, DDB and Proton.
TypeScript
11
star
63

kendo-icons

Kendo Icons
C#
11
star
64

platform-friends-android

A full-featured social demo app that shows how to integrate a wide range of Telerik Platform services into a native Android application.
Java
11
star
65

kendo-angular-messages

Localization Messages - Kendo UI for Angular
JavaScript
10
star
66

olympic-games-sample-app-mvc

This is the Olympic Games sample app
C#
9
star
67

kendo-react-getting-started

Used in the KendoReact documentation
JavaScript
9
star
68

kendo-react-dropdowns

Kendo UI DropDowns for React
JavaScript
9
star
69

kendo-angular-demo-aspnetcore-data

Kendo UI for Angular - Binding to an ASP.NET Core service
TypeScript
9
star
70

kendo-angular-quickstart-dotnet

Using Kendo UI for Angular with the .NET Core 3.x
TypeScript
9
star
71

xamarin-sdk

C#
9
star
72

kendo-common-tasks

Moved to https://github.com/telerik/kendo-build-tasks
JavaScript
8
star
73

devreach-blazor

C#
8
star
74

nativescript-starter-kits

NativeScript Cli Extension
TypeScript
8
star
75

reporting-docs

Public Documentation for Reporting
JavaScript
8
star
76

semantic-prerelease

A set of semantic-release scripts that allow publishing of prerelease versions behind dist-tags.
JavaScript
8
star
77

uwp-docs

telerik
HTML
8
star
78

mvc-bootstrap-demo

HTML
8
star
79

fiddler-everywhere

This public repository aims at providing a convenient way for users of Fiddler Everywhere to report issues they may encounter while using the tool.
8
star
80

kendo-react-nextjs

An example of the KendoReact Grid(Table) in NextJS application.
TypeScript
7
star
81

kendo-react-messages

Localization Messages - KendoReact https://www.telerik.com/kendo-react-ui/components/
7
star
82

kendo-with-vuex

This is a sample application showing how Vuex can be used to feed the Kendo UI for Vue components
Vue
7
star
83

docs-seed

Telerik Documentation Infrastructure
JavaScript
7
star
84

.net-blogsamples

public repository for demos related to Telerik .Net blog posts
JavaScript
7
star
85

kendo-theme-material

(PREVIEW) Kendo UI theme based on the Material Design guidelines
CSS
6
star
86

kendo-react-homepage-demo

A sample application showcasing the KendoReact Grid in action with GraphQL
JavaScript
6
star
87

kendo-react-sales-dashboard

This is a Dashboad created using KendoReact components
JavaScript
6
star
88

CodeSnippetsAndTemplates

This repository includes mainly custom shortcut code snippets and some templates for the Telerik and Kendo UI controls/widgets
Vim Snippet
6
star
89

serverless-s3-upload

Uploads files/folders to AWS S3 bucket.
JavaScript
6
star
90

JustMockCourse

Sample code for Progress Telerik JustMock Virtual Classroom Course
C#
6
star
91

kendo-react-material-dashboard

JavaScript
6
star
92

quick-start-nativescript-template

JavaScript
5
star
93

nativescript-page-templates

Simple page templates for Vanilla NativeScript apps using JavaScript
JavaScript
5
star
94

figma-instarelinker-community

5
star
95

Blazor-Quick-Start-Videos

This is a sample which was built for the Blazor Quick Start video series.
HTML
5
star
96

mvc-tripxpert-pwa

Placeholder repo for telerik/mvc-tripxpert-sample-app in PWA flavour
JavaScript
5
star
97

kendo-react-demo-aspnetcore-data

Kendo UI for React - Binding to an ASP.NET Core service
JavaScript
5
star
98

finance-portfolio-sample-app-core

Finance Portfolio is a sample application built with components from the Telerik UI for ASP.NET Core suite
SCSS
5
star
99

kendo-vscode-extensions

TypeScript
5
star
100

document-processing-docs

Public Documentation for Telerik Document Processing
JavaScript
5
star