public void TestDetach_WithSelectedCore_WithTwoFragments_ShouldDetachTopFragment() { ICore dummyCore = new SystemCore("A", 100); IFragment dummyFragment = new NuclearFragment("Test", 1); IFragment anotherDummyFragment = new NuclearFragment("Test2", 1); dummyCore.AttachFragment(dummyFragment); dummyCore.AttachFragment(anotherDummyFragment); this.testNuclearPowerPlant.AttachCore(dummyCore); this.testNuclearPowerPlant.SelectCore("A"); ICommand testCommand = new DetachFragmentCommand(this.testNuclearPowerPlant); String actualMessage = testCommand.Execute(); String expectedMessage = "Successfully detached Fragment Test2 from Core A!"; Assert.AreEqual(expectedMessage, actualMessage, "DetachFragment command does not work correctly!"); }