Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ JustMock Lite
[![nuget](https://img.shields.io/nuget/v/JustMock.svg?label=nuget)](https://www.nuget.org/packages/JustMock/)
[![license](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/telerik/JustMockLite/blob/master/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 <a href="http://www.telerik.com/justmock/free-mocking" target="_blank">JustMock Lite website</a>.
**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](http://www.telerik.com/justmock/free-mocking).

### JustMock Lite Key Features
- **AAA pattern** – JustMockLite uses the Arrange Act Assert (AAA) pattern.
Expand Down Expand Up @@ -68,16 +68,15 @@ public void TestBookService()
}
```

### Supported Frameworks
- .Net Framework 4.5+ and later.
- .NET 5, .NET 6 preview 2
- .Net Core 2.0 and later.
### Supported .NET Frameworks
- .NET Framework 4.7.2 and later
- .NET LTS/STS versions via .NET Standard 2.1

### Documentation
JustMock Lite and JustMock are coming with extensive <a href="http://docs.telerik.com/devtools/justmock/introduction.html" target="_blank">Documentation</a> and examples that will help you quickly get started with the framework.
JustMock Lite and JustMock are coming with extensive [Documentation](http://docs.telerik.com/devtools/justmock/introduction.html) 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 <a href="https://feedback.telerik.com/Project/105" target="_blank">Feedback Portal</a>.
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](https://feedback.telerik.com/Project/105).


### Happy mocking!
32 changes: 16 additions & 16 deletions Telerik.JustMock.DemoLib/ChannelManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ limitations under the License.

namespace Telerik.JustMock.DemoLib
{
public class ChannelManager
{
internal static IPAddress Address { get; set; }

public static void Open()
{
ChannelManager.Address = IPAddress.Parse("10.10.1.1");

var address = ChannelManager.Address;

if (address != null)
{
throw new Exception("Invalid IP address");
}
}
}
public class ChannelManager
{
internal static IPAddress Address { get; set; }

public static void Open()
{
ChannelManager.Address = IPAddress.Parse("10.10.1.1");

var address = ChannelManager.Address;

if (address != null)
{
throw new Exception("Invalid IP address");
}
}
}
}
14 changes: 7 additions & 7 deletions Telerik.JustMock.DemoLib/ConfigurationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ limitations under the License.

namespace Telerik.JustMock.DemoLib
{
public static class ConfigurationService
{
public static Configuration GetConfiguration()
{
return null;
}
}
public static class ConfigurationService
{
public static Configuration GetConfiguration()
{
return null;
}
}
}
22 changes: 11 additions & 11 deletions Telerik.JustMock.DemoLib/ExpressionNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ limitations under the License.

namespace Telerik.JustMock.DemoLib
{
public abstract class ExpressionNode
{
protected internal virtual ExpressionNode Accept(ExpressionNodeVisitor visitor)
{
return visitor.VisitExtension(this);
}
public abstract class ExpressionNode
{
protected internal virtual ExpressionNode Accept(ExpressionNodeVisitor visitor)
{
return visitor.VisitExtension(this);
}

protected internal virtual ExpressionNode VisitChildren(ExpressionNodeVisitor visitor)
{
return this;
}
}
protected internal virtual ExpressionNode VisitChildren(ExpressionNodeVisitor visitor)
{
return this;
}
}
}
14 changes: 7 additions & 7 deletions Telerik.JustMock.DemoLib/ExpressionVisitorNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ limitations under the License.

namespace Telerik.JustMock.DemoLib
{
public abstract class ExpressionNodeVisitor
{
protected internal virtual ExpressionNode VisitExtension(ExpressionNode node)
{
return node.VisitChildren(this);
}
}
public abstract class ExpressionNodeVisitor
{
protected internal virtual ExpressionNode VisitExtension(ExpressionNode node)
{
return node.VisitChildren(this);
}
}
}
14 changes: 7 additions & 7 deletions Telerik.JustMock.DemoLib/FooInternal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ limitations under the License.

namespace Telerik.JustMock.DemoLib
{
internal class FooInternal
{
internal virtual int Echo(int arg)
{
throw new NotImplementedException();
}
}
internal class FooInternal
{
internal virtual int Echo(int arg)
{
throw new NotImplementedException();
}
}
}
14 changes: 7 additions & 7 deletions Telerik.JustMock.DemoLib/FooInternalSealed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ limitations under the License.

namespace Telerik.JustMock.DemoLib
{
internal sealed class FooInternalSealed
{
internal int Echo(int arg)
{
throw new NotImplementedException();
}
}
internal sealed class FooInternalSealed
{
internal int Echo(int arg)
{
throw new NotImplementedException();
}
}
}
8 changes: 4 additions & 4 deletions Telerik.JustMock.DemoLib/IFooInternal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ limitations under the License.

namespace Telerik.JustMock.DemoLib
{
internal interface IFooInternal
{
int Echo(int arg);
}
internal interface IFooInternal
{
int Echo(int arg);
}
}
8 changes: 4 additions & 4 deletions Telerik.JustMock.DemoLib/JustMock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ limitations under the License.

namespace Telerik.JustMock.DemoLib
{
public static class JustMock
{
public const string FullyQualifiedAssemblyName = "Telerik.JustMock, PublicKey=0024000004800000940000000602000000240000525341310004000001000100098b1434e598c656b22eb59000b0bf73310cb8488a6b63db1d35457f2f939f927414921a769821f371c31a8c1d4b73f8e934e2a0769de4d874e0a517d3d7b9c36cd0ffcea2142f60974c6eb00801de4543ef7e93f79687b040d967bb6bd55ca093711b013967a096d524a9cadf94e3b748ebdae7947ea6de6622eabf6548448e";
}
public static class JustMock
{
public const string FullyQualifiedAssemblyName = "Telerik.JustMock, PublicKey=0024000004800000940000000602000000240000525341310004000001000100098b1434e598c656b22eb59000b0bf73310cb8488a6b63db1d35457f2f939f927414921a769821f371c31a8c1d4b73f8e934e2a0769de4d874e0a517d3d7b9c36cd0ffcea2142f60974c6eb00801de4543ef7e93f79687b040d967bb6bd55ca093711b013967a096d524a9cadf94e3b748ebdae7947ea6de6622eabf6548448e";
}
}
22 changes: 11 additions & 11 deletions Telerik.JustMock.DemoLib/LocalFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

namespace Telerik.JustMock.DemoLib
{
public class DemoLibLocalFunctions
{
public int Method()
{
return 5 + Local();
int Local()
{
return 10;
}
}
}
public class DemoLibLocalFunctions
{
public int Method()
{
return 5 + Local();
int Local()
{
return 10;
}
}
}
}
22 changes: 11 additions & 11 deletions Telerik.JustMock.DemoLib/Objects/ClassWithDynamicDataMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ limitations under the License.

namespace Telerik.JustMock.DemoLib.Objects
{
public class ClassWithDynamicDataMethod
{
public bool Method1()
{
return Method2(new { V1 = "A" });
}
public class ClassWithDynamicDataMethod
{
public bool Method1()
{
return Method2(new { V1 = "A" });
}

public static bool Method2(dynamic data)
{
throw new NotImplementedException();
}
}
public static bool Method2(dynamic data)
{
throw new NotImplementedException();
}
}
}
6 changes: 3 additions & 3 deletions Telerik.JustMock.DemoLib/Objects/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.

namespace Telerik.JustMock.DemoLib.Objects
{
public class Configuration
{
}
public class Configuration
{
}
}
14 changes: 7 additions & 7 deletions Telerik.JustMock.DemoLib/Objects/ILogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ limitations under the License.

namespace Telerik.JustMock.DemoLib.Objects
{
/// <summary>
/// Logger API
/// </summary>
public interface ILogger
{
void Log(string message);
}
/// <summary>
/// Logger API
/// </summary>
public interface ILogger
{
void Log(string message);
}
}
12 changes: 6 additions & 6 deletions Telerik.JustMock.DemoLib/Objects/InternalObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ limitations under the License.

namespace Telerik.JustMock.DemoLib.Objects
{
public class InternalObject
{
internal InternalObject()
{
public class InternalObject
{
internal InternalObject()
{

}
}
}
}
}
28 changes: 14 additions & 14 deletions Telerik.JustMock.DemoLib/Objects/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ limitations under the License.

namespace Telerik.JustMock.DemoLib.Objects
{
/// <summary>
/// Dummy account class.
/// </summary>
internal class Logger : ILogger
{
internal void LogInternal(string messaage)
{
throw new NotImplementedException();
}
/// <summary>
/// Dummy account class.
/// </summary>
internal class Logger : ILogger
{
internal void LogInternal(string messaage)
{
throw new NotImplementedException();
}

public void Log(string message)
{
LogInternal(message);
}
}
public void Log(string message)
{
LogInternal(message);
}
}
}
28 changes: 14 additions & 14 deletions Telerik.JustMock.DemoLib/Objects/TransactionHeaderViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@ limitations under the License.

namespace Telerik.JustMock.DemoLib.Objects
{
public class TransactionHeaderViewModel
{
public void SetLineNumbers()
{
public class TransactionHeaderViewModel
{
public void SetLineNumbers()
{

}
}

public void SaveTicket()
{
}
public void SaveTicket()
{
}

public void SetPaidAmount()
{
public void SetPaidAmount()
{

}
}

public string OperatorId { get; set; }
public int ReservationNumber { get; set; }
public string OperatorId { get; set; }
public int ReservationNumber { get; set; }

}
}
}
8 changes: 4 additions & 4 deletions Telerik.JustMock.DemoLib/Objects/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ limitations under the License.

namespace Telerik.JustMock.DemoLib.Objects
{
public class User
{
public string UserId { get; set; }
}
public class User
{
public string UserId { get; set; }
}
}
Loading