public void GetSession_OnDeletedObject_Throws() { Site.CreateUser("pinco", "pippo.123"); var expectedSessionId = Site.Login("pinco", "pippo.123").Id; Site.Delete(); Assert.That(() => Site.GetSession(expectedSessionId), Throws.TypeOf <InvalidOperationException>()); }