Beispiel #1
0
 public void AddedCell_IsPersistent()
 {
     Repository = new CellRepository();
     Sut        = new HoneycombModel(Repository);
     Sut.Load();
     Sut.Cells.Should().Contain(CellModel1);
 }
Beispiel #2
0
 public virtual void SetUp()
 {
     Repository = new CellRepository();
     Repository.RemoveAll();
     Model = new HoneycombModel(Repository);
     Sut   = new HoneycombViewModel(Model, null);
     Sut.PropertyChanged += (sender, args) =>
                            ChangedPropertyName = args.PropertyName;
 }
        public void TitleChanged_CellModelIsUpdated()
        {
            const string newTitle = "test cell model 1 changed";

            CellModel1.Title = newTitle;
            Repository       = new CellRepository();
            Sut = new HoneycombModel(Repository);
            Sut.Load();
            var changedCellModel = Sut.Cells.FirstOrDefault(
                cellModel => cellModel.Title == newTitle);

            changedCellModel.Should().NotBeNull();
        }
Beispiel #4
0
 public virtual void SetUp()
 {
     Repository = new CellRepository();
     Repository.RemoveAll();
     Sut        = new HoneycombModel(Repository);
     CellModel1 = new CellModel {
         Title = "test cell model 1"
     };
     CellModel2 = new CellModel {
         Title = "test cell model 2"
     };
     CellModel3 = new CellModel {
         Title = "test cell model 3"
     };
 }
Beispiel #5
0
 public HoneycombService()
 {
     Honeycomb = new HoneycombModel(new CellRepository());
 }