Hallo, ich habe dieses Property in einer Klasse:
//Controller.cs
//State.cs ist aus Microsoft.ApplicationBlocks.UIProcess
public Amount Amount
{
get{return State["Amount"] as Amount;}
set{State["Amount"] = value;}
}
Das möchte ich nun aus einer Testklasse raus testen. Die Frage ist nun natürlich wie genau. Wenn ich sowas hier mache,
//ControllerTest.cs
[Test]
public void AmountTest()
{
Amount nullAmount = controller.Amount;
Assert.IsNull(nullAmount); //true
}
dann geht das zwar, ist ja aber nur die halbe Miete. Wie stelle ich es also an, zu gucken, ob auch was != null zurück kommt?
Mock<???> amountMock = new Mock<???>();
Danke 😃