Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Model
- {
- public int Id {get;set;}
- public string Name {get; set;}
- public void myAction(MyDatabase db, string r, string i) {
- db.DataEmp.Add(new DataEmp{
- Id = this.Id,
- DateOfAction = DateTime.UtcNow,
- R = r,
- I = i
- });
- db.SaveChanges();
- }
- }
- [Test]
- public void Method_Test_Pass_myAction()
- {
- newModel.myAction(db,"R","I");
- Assert.That(db.DataEmp.FirstOrDefault(de => de.Id == newModel.Id), Is.Null);
- }
Add Comment
Please, Sign In to add comment