public void NotifyObserverReceived() { SWT_ATM.IObserver <List <Data> > observer = Substitute.For <SWT_ATM.IObserver <List <Data> > >(); Data data = new Data("", 0, 0, 0, ""); subject.Attach(observer); var list = new List <Data> { data }; subject.Notify(list); observer.Received(1).Update(list); }
public void NotifyObserverNotReceived() { SWT_ATM.IObserver <List <Data> > observer = Substitute.For <SWT_ATM.IObserver <List <Data> > >(); Data data = new Data("", 0, 0, 0, ""); subject.Attach(observer); subject.Deattach(observer); subject.Notify(new List <Data> { data }); observer.DidNotReceive().Update(new List <Data> { data }); }