- SampleApp-CodeProject.zip
- Sample App - CodeProject
- DAL
- Entity
- Insurer.PexTests
- Insurer.Test
- Insurer
- ReadMe.txt
- Reference Assemblies
- NSubstitute
- NET35
- NSubstitute.dll
- NSubstitute.XML
- NET40
- NSubstitute.dll
- NSubstitute.XML
- SampleApp.Model
- ModelDefinition
- SampleApp.Model.uml
- SampleApp.layerdiagram
- SampleApp.layerdiagram.layout
- SampleApp.layerdiagram.suppressions
- SampleApp.Model.modelproj
- SampleApp.sln
- SampleApp-CodeProject-noexe.zip
|
// <copyright file="InsurerPexTest.cs" company="Microsoft">Copyright � Microsoft 2012</copyright>
using System;
using Microsoft.Pex.Framework;
using Microsoft.Pex.Framework.Validation;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SampleApp;
using SampleApp.DAL;
using SampleApp.Entity;
namespace SampleApp
{
/// <summary>This class contains parameterized unit tests for Insurer</summary>
[PexClass(typeof(Insurer))]
[PexAllowedExceptionFromTypeUnderTest(typeof(InvalidOperationException))]
[PexAllowedExceptionFromTypeUnderTest(typeof(ArgumentException), AcceptExceptionSubtypes = true)]
[TestClass]
public partial class InsurerPexTest
{
/// <summary>Test stub for .ctor(IDAL)</summary>
[PexMethod]
public Insurer Constructor(IDAL dal)
{
Insurer target = new Insurer(dal);
return target;
// TODO: add assertions to method InsurerPexTest.Constructor(IDAL)
}
/// <summary>Test stub for GetInsureAmount(Person)</summary>
[PexMethod(MaxBranches=20000), PexAllowedException(typeof(NotEligibleException))]
public float GetInsureAmount([PexAssumeUnderTest]Insurer target, Person p)
{
float result = target.GetInsureAmount(p);
return result;
// TODO: add assertions to method InsurerPexTest.GetInsureAmount(Insurer, Person)
}
[PexMethod, PexAllowedException(typeof(NotEligibleException))]
public float GetInsureAmount01()
{
Insurer target = InsurerFactory.Create01();
Person p = new Person();
float result = target.GetInsureAmount(p);
return result;
// TODO: add assertions to method InsurerPexTest.GetInsureAmount(Insurer, Person)
}
/// <summary>Test stub for IsPersonEligible(Person)</summary>
[PexMethod]
public bool IsPersonEligible([PexAssumeUnderTest]Insurer target, Person p)
{
bool result = target.IsPersonEligible(p);
return result;
// TODO: add assertions to method InsurerPexTest.IsPersonEligible(Insurer, Person)
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.