コード例 #1
0
 public void addNullPartReturnsNull()
 {
   Thing thing = new Thing("hat");
   var thing2 = thing.AddPart(null);
   Assert.That(thing2, Is.Null);
 }
コード例 #2
0
 public void addPartOfReturnsTheAddedPart()
 {
   Thing thing = new Thing("hat");
   var thing2 = thing.AddPart(new Thing("hatband"));
   Assert.That(thing.HasParts,Is.True);
 }
コード例 #3
0
    public void getPartsReturnsPartsofThing()
    {
      Thing thing = new Thing("hat");
      var thing2 = thing.AddPart(new Thing("hatband"));
      Assert.That(thing.GetParts().First().SameIdentityAs(thing2), Is.True);

    }
コード例 #4
0
 public void addPartOfReturnsHasPartTrue()
 {
   Thing thing = new Thing("hat");
   thing.AddPart(new Thing("hatband"));
   Assert.That(thing.HasParts,Is.True);
 }
コード例 #5
0
    public void thingIsPartOf()
    {
      Thing thing = new Thing("hat");
      var thing2 = new Thing("hatband");

      thing.AddPart(thing2);
      Assert.That(thing2.IsPartOf, Is.True);

    }