public void Remove_CountIsRight() { ModelMock toRemove = new ModelMock { String = "To Remove." }; controller.Add(toRemove); controller.Remove(toRemove); Assert.That(controller.Count(), Is.EqualTo(modelsCount)); }
public void PasteAt_ModelPastedAtIndex() { int index = modelsCount; DateTime expectedDate = new DateTime(2011, 11, 11); string expectedString = "string"; ModelMock mockModel = new ModelMock { Date = new DateTime(2011, 11, 11), String = expectedString }; controller.PasteAt(modelsCount, mockModel); ModelMock resultModel = controller.Get(index); Assert.Multiple(() => { Assert.That(resultModel.Date, Is.EqualTo(expectedDate)); Assert.That(resultModel.String, Is.EqualTo(expectedString)); }); }