Esempio n. 1
0
        public void Save_AssignsIdToObject_Id()
        {
            //Arrange
            StylistSpecialty testStylistSpecialty = new StylistSpecialty(1, 1);

            //Act
            testStylistSpecialty.Save();
            StylistSpecialty savedStylistSpecialty = StylistSpecialty.GetAll()[0];

            int result = savedStylistSpecialty.GetId();
            int testId = testStylistSpecialty.GetId();

            //Assert
            Assert.AreEqual(testId, result);
        }
Esempio n. 2
0
        public void GetTest_ReturnDataField()
        {
            // Arrange
            int id          = 1;
            int stylistId   = 1;
            int specialtyId = 1;
            StylistSpecialty testStylistSpecialty = new StylistSpecialty(stylistId, specialtyId, id);

            // Act
            int resultId          = testStylistSpecialty.GetId();
            int resultStylistId   = testStylistSpecialty.GetStylistId();
            int resultSpecialtyId = testStylistSpecialty.GetSpecialtyId();

            // Assert
            Assert.AreEqual(id, resultId);
            Assert.AreEqual(stylistId, resultStylistId);
            Assert.AreEqual(specialtyId, resultSpecialtyId);
        }