예제 #1
0
        public void TestShouldGetPersonFromIdAndGetNull()
        {
            // Arrange
            var persons = SamplePersonInProduct.CreatePersonsInProduct();

            // Act
            var result = PersonInProduct.Get(2, Role.Producer);

            // Assert
            var person = persons.SingleOrDefault(result);

            Assert.IsNull(person);
        }
예제 #2
0
        public void TestShouldGetPersonFromId()
        {
            // Arrange
            var persons = SamplePersonInProduct.CreatePersonsInProduct();

            // Act
            var result = PersonInProduct.Get(1, Role.Producer);

            // Assert
            var person = persons.SingleOrDefault(result);

            Assert.IsNotNull(person);
            Assert.AreEqual("First Person", person.Name);
        }