What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-15 15:43:23
nsubstitute method returns
This value will be returned every time this call is made. Returns() will only apply to this combination of arguments, so other calls to this method will return a default value instead. //Make a call return 3: calculator.Add(1, 2).Returns(3); Assert.AreEq... Add solution -
Other 2021-09-16 17:24:03
nsubstitute configure property
The return value for a property can be set in the same way as for a method, using Returns(). You can also just use plain old property setters for read/write properties; they’ll behave just the way you expect them to. calculator.Mode.Returns("DE... Add solution -
Other 2021-09-05 14:02:02
use repository and unit of work in in unit testing
[TestMethod] public void ProductService_Given_Product_Id_Should_Get_Product_Name() { //Arrange var productId = 1; var expected = "AAA"; var product = new Product() { ProductName = expected, ProductID = productId }; var produ... Add solution