Exemplo n.º 1
0
        public void Test_FindBandIdInDatabase_band()
        {
            // Arrange
            Band newBand = new Band("Drake");

            newBand.Save();

            // Act
            Band result = Band.Find(newBand.GetId());

            // Assert
            Assert.Equal(newBand, result);
        }
Exemplo n.º 2
0
 // stops doubles between database and object
 public override bool Equals(System.Object otherBand)
 {
     if (!(otherBand is Band))
     {
         return(false);
     }
     else
     {
         Band newBand      = (Band)otherBand;
         bool idEquality   = this.GetId() == newBand.GetId();
         bool nameEquality = this.GetName() == newBand.GetName();
         return(idEquality && nameEquality);
     }
 }