You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace MoqStudy.MockModel
|
|
|
|
|
{
|
|
|
|
|
public class Teacher
|
|
|
|
|
{
|
|
|
|
|
public Teacher(){ }
|
|
|
|
|
public Teacher(int groupId)
|
|
|
|
|
{
|
|
|
|
|
GroupId = groupId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
public int GroupId { get; set; }
|
|
|
|
|
|
|
|
|
|
public virtual int Add()
|
|
|
|
|
{
|
|
|
|
|
return Id + GroupId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected virtual int GetAge(int age)
|
|
|
|
|
{
|
|
|
|
|
return age + 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected virtual bool Execute(int number)
|
|
|
|
|
{
|
|
|
|
|
if (number == 0)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return number % 2 == 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|