예제 #1
0
        public void RetrieveWithKeysTest()
        {
            var repository = new VendorRepository();
            var expected   = new Dictionary <string, Vendor>()
            {
                { "T", new Vendor()
                  {
                      VendorId = 1, CompanyName = "Technossus", Email = "*****@*****.**"
                  } },
                { "I", new Vendor()
                  {
                      VendorId = 2, CompanyName = "Infosys", Email = "*****@*****.**"
                  } }
            };
            //Act
            var actual = repository.RetrieveWithKeys();

            //Assert
            CollectionAssert.AreEqual(expected, actual);
        }
예제 #2
0
        public void RetrieveWithKeysTest()
        {
            var repository = new VendorRepository();
            var expected   = new Dictionary <string, Vendor>()
            {
                { "ABC Corp", new Vendor()
                  {
                      VendorId = 5, CompanyName = "ABC Corp", Email = "*****@*****.**"
                  } },
                { "XYZ Inc", new Vendor()
                  {
                      VendorId = 8, CompanyName = "XYZ Inc", Email = "*****@*****.**"
                  } },
            };
            //Act
            var actual = repository.RetrieveWithKeys();

            //Assert
            CollectionAssert.AreEqual(expected, actual);
        }
예제 #3
0
        public void RetrieveWithKeysTest()
        {
            //Arrange
            var repo     = new VendorRepository();
            var expected = new Dictionary <string, Vendor>()
            {
                { "ABC Corp", new Vendor()
                  {
                      VendorId = 1, CompanyName = "ABC Corp", Email = "*****@*****.**"
                  } },
                { "XYZ Inc", new Vendor()
                  {
                      VendorId = 2, CompanyName = "XYZ Inc", Email = "*****@*****.**"
                  } }
            };

            //Act
            var actual = repo.RetrieveWithKeys();

            //Assert
            Assert.Equal(expected, actual);
        }