public void OnNameUpdate() { var project = new Mock<IProject>(); var facade = new ScriptFrontEndProjectFacade(new ScriptBackEndProjectFacade(new ProjectFacade(project.Object))); bool eventRaised = false; facade.OnNameChanged += (s, e) => { eventRaised = true; }; project.Raise(p => p.OnNameChanged += null, new ValueChangedEventArgs<string>("newName")); Assert.IsTrue(eventRaised); }
public void OnDatasetDeleted() { var project = new Mock<IProject>(); var facade = new ScriptFrontEndProjectFacade(new ScriptBackEndProjectFacade(new ProjectFacade(project.Object))); bool eventRaised = false; facade.OnDatasetDeleted += (s, e) => { eventRaised = true; }; project.Raise(p => p.OnDatasetDeleted += null, EventArgs.Empty); Assert.IsTrue(eventRaised); }
public void OnDatasetDeleted() { var project = new Mock <IProject>(); var facade = new ScriptFrontEndProjectFacade(new ScriptBackEndProjectFacade(new ProjectFacade(project.Object))); bool eventRaised = false; facade.OnDatasetDeleted += (s, e) => { eventRaised = true; }; project.Raise(p => p.OnDatasetDeleted += null, EventArgs.Empty); Assert.IsTrue(eventRaised); }
public void OnSummaryUpdate() { var project = new Mock <IProject>(); var facade = new ScriptFrontEndProjectFacade(new ScriptBackEndProjectFacade(new ProjectFacade(project.Object))); bool eventRaised = false; facade.OnSummaryChanged += (s, e) => { eventRaised = true; }; project.Raise(p => p.OnSummaryChanged += null, new ValueChangedEventArgs <string>("newSummary")); Assert.IsTrue(eventRaised); }
public void Root() { var project = new Mock <IProject>(); { project.Setup(p => p.BaseDataset()) .Returns(new Mock <IProxyDataset>().Object); } var facade = new ScriptFrontEndProjectFacade(new ScriptBackEndProjectFacade(new ProjectFacade(project.Object))); var root = facade.Root(); Assert.IsNotNull(root); }
public void Name() { var project = new Mock<IProject>(); { project.SetupProperty(p => p.Name); } var facade = new ScriptFrontEndProjectFacade(new ScriptBackEndProjectFacade(new ProjectFacade(project.Object))); var name = "name"; facade.Name = name; Assert.AreEqual(name, facade.Name); }
public void Summary() { var project = new Mock <IProject>(); { project.SetupProperty(p => p.Summary); } var facade = new ScriptFrontEndProjectFacade(new ScriptBackEndProjectFacade(new ProjectFacade(project.Object))); var summary = "text"; facade.Summary = summary; Assert.AreEqual(summary, facade.Summary); }
public void Name() { var project = new Mock <IProject>(); { project.SetupProperty(p => p.Name); } var facade = new ScriptFrontEndProjectFacade(new ScriptBackEndProjectFacade(new ProjectFacade(project.Object))); var name = "name"; facade.Name = name; Assert.AreEqual(name, facade.Name); }
public void Root() { var project = new Mock<IProject>(); { project.Setup(p => p.BaseDataset()) .Returns(new Mock<IProxyDataset>().Object); } var facade = new ScriptFrontEndProjectFacade(new ScriptBackEndProjectFacade(new ProjectFacade(project.Object))); var root = facade.Root(); Assert.IsNotNull(root); }
public void Summary() { var project = new Mock<IProject>(); { project.SetupProperty(p => p.Summary); } var facade = new ScriptFrontEndProjectFacade(new ScriptBackEndProjectFacade(new ProjectFacade(project.Object))); var summary = "text"; facade.Summary = summary; Assert.AreEqual(summary, facade.Summary); }