public void NewClass_Created_NotAddedToList() { var domainEvent = new DomainObjectCreatedEvent<Classifier>(new Classifier("class")); var interfaceSelectionSource = new InterfaceSelectionItemsSource(_classifiers, _query, _messageSystem); // act: let source react on add event interfaceSelectionSource.OnNewClassifierCreated(domainEvent); // assert: class should not be added Assert.IsEmpty(interfaceSelectionSource); }
public void NewInterface_Created_AddedToList() { var domainEvent = new DomainObjectCreatedEvent<Classifier>( new Classifier("interface") {IsInterface = true}); var interfaceSelectionSource = new InterfaceSelectionItemsSource(_classifiers, _query, _messageSystem); // act: let source react on add event interfaceSelectionSource.OnNewClassifierCreated(domainEvent); // assert: interface should be added Assert.IsTrue(interfaceSelectionSource.Count == 1); }