Hi Telerik Team,
I have some couple of doubts in Telerik JustMock Trial Edition which i am trying to do sample project in order to startwith.Based on the success we will go for integration with bigger entity framework projects.
1. Brief description of my tiny sample project:- Here GetProjectsTest(), connects to database and returns the number of projects in the form of generic List and then i compared with existing project instance 'tom' which is then added to generic list. Suppose both hard coded value and the other which i get from database are equal then the result is passed.
My aim is to check whether i am able to work with project even when the database service is not available.
//sample code
using TestProject1; - This is the project where i am having all my classes.
[TestMethod()]
public void GetProjectsTest()
{
// Assert.IsFalse(Mock.IsProfilerEnabled);
//Arrange
Project tom = new Project() { ProjectID = 1, ProjectName = "iris" };
List<Project> lstpers = new List<Project>();
lstpers.Add(tom);
//Mock.SetupStatic<ProjectManager>(Behavior.Strict);
Mock.Arrange(() => ProjectManager.GetProjects()).Returns(lstpers);
//Act + Assert
Assert.AreEqual(ProjectManager.GetProjects(), lstpers);
}
when i try to debug the above code , it throws the following errors:-
Locating source for 'c:\B\Basilisk\Basilisk CI Build\Sources\CodeBase\Telerik.JustMock\Mock.cs'. (No checksum.)
The file 'c:\B\Basilisk\Basilisk CI Build\Sources\CodeBase\Telerik.JustMock\Mock.cs' does not exist.
Looking in script documents for 'c:\B\Basilisk\Basilisk CI Build\Sources\CodeBase\Telerik.JustMock\Mock.cs'...
Looking in the projects for 'c:\B\Basilisk\Basilisk CI Build\Sources\CodeBase\Telerik.JustMock\Mock.cs'.
The file was not found in a project.
Looking in directory 'E:\Program Files\Microsoft Visual Studio 10.0\VC\crt\src\'...
Looking in directory 'E:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'...
Looking in directory 'E:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'...
Looking in directory 'E:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: c:\B\Basilisk\Basilisk CI Build\Sources\CodeBase\Telerik.JustMock\Mock.cs.
The debugger could not locate the source file 'c:\B\Basilisk\Basilisk CI Build\Sources\CodeBase\Telerik.JustMock\Mock.cs'.
2. Please explain step by step , so that i could understand what happens when i debug my code , when JustMock is disabled in Telerik Menu of Visual studio2010,
With Great Expectation
Ulaga
I have some couple of doubts in Telerik JustMock Trial Edition which i am trying to do sample project in order to startwith.Based on the success we will go for integration with bigger entity framework projects.
1. Brief description of my tiny sample project:- Here GetProjectsTest(), connects to database and returns the number of projects in the form of generic List and then i compared with existing project instance 'tom' which is then added to generic list. Suppose both hard coded value and the other which i get from database are equal then the result is passed.
My aim is to check whether i am able to work with project even when the database service is not available.
//sample code
using TestProject1; - This is the project where i am having all my classes.
[TestMethod()]
public void GetProjectsTest()
{
// Assert.IsFalse(Mock.IsProfilerEnabled);
//Arrange
Project tom = new Project() { ProjectID = 1, ProjectName = "iris" };
List<Project> lstpers = new List<Project>();
lstpers.Add(tom);
//Mock.SetupStatic<ProjectManager>(Behavior.Strict);
Mock.Arrange(() => ProjectManager.GetProjects()).Returns(lstpers);
//Act + Assert
Assert.AreEqual(ProjectManager.GetProjects(), lstpers);
}
when i try to debug the above code , it throws the following errors:-
Locating source for 'c:\B\Basilisk\Basilisk CI Build\Sources\CodeBase\Telerik.JustMock\Mock.cs'. (No checksum.)
The file 'c:\B\Basilisk\Basilisk CI Build\Sources\CodeBase\Telerik.JustMock\Mock.cs' does not exist.
Looking in script documents for 'c:\B\Basilisk\Basilisk CI Build\Sources\CodeBase\Telerik.JustMock\Mock.cs'...
Looking in the projects for 'c:\B\Basilisk\Basilisk CI Build\Sources\CodeBase\Telerik.JustMock\Mock.cs'.
The file was not found in a project.
Looking in directory 'E:\Program Files\Microsoft Visual Studio 10.0\VC\crt\src\'...
Looking in directory 'E:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'...
Looking in directory 'E:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'...
Looking in directory 'E:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: c:\B\Basilisk\Basilisk CI Build\Sources\CodeBase\Telerik.JustMock\Mock.cs.
The debugger could not locate the source file 'c:\B\Basilisk\Basilisk CI Build\Sources\CodeBase\Telerik.JustMock\Mock.cs'.
2. Please explain step by step , so that i could understand what happens when i debug my code , when JustMock is disabled in Telerik Menu of Visual studio2010,
With Great Expectation
Ulaga