File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Generic.Repository.EntityFramework.Test Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,19 @@ public void Add_data_to_datastore_successful()
7272 _IMockCtx . Verify ( v => v . Set < InputModel > ( ) . Add ( It . IsAny < InputModel > ( ) ) , Times . Once ) ;
7373 _IMockCtx . Verify ( v => v . Save ( ) , Times . Once ) ;
7474 }
75+ [ TestMethod ]
76+ public void Update_data_from_datastore_successful ( )
77+ {
78+ //Arrange
79+ var repository = new Repository < InputModel > ( _IMockCtx . Object ) ;
80+ var data = model . FirstOrDefault ( ) ;
81+ //Act
82+ repository . Update ( data ) ;
7583
84+ //Assert
85+ _IMockCtx . Verify ( v => v . Set < InputModel > ( ) . Attach ( It . IsAny < InputModel > ( ) ) , Times . Once ) ;
86+ _IMockCtx . Verify ( v => v . Save ( ) , Times . Once ) ;
87+ }
7688 [ TestMethod ]
7789 public void Delete_data_from_datastore_successful ( )
7890 {
You can’t perform that action at this time.
0 commit comments