예제 #1
0
        public void GetHashCode_NotEqual_PathLenght_Test()
        {
            var location1 = new TsModuleLocation("Test", new List <string> {
                "path1", "path2", "path3"
            });
            var location2 = new TsModuleLocation("Test1", new List <string> {
                "path1", "path2"
            });

            Assert.AreNotEqual(location1.GetHashCode(), location2.GetHashCode());
        }
예제 #2
0
        public void Equals_False_Test()
        {
            var location1 = new TsModuleLocation("Test", new List <string> {
                "path1", "path2", "path3"
            });
            var location2 = new TsModuleLocation("Test", new List <string> {
                "path1", "path2"
            });

            Assert.IsFalse(location1.Equals(location2));
        }
예제 #3
0
        public void Dictionary_Lookup_Test()
        {
            var location1 = new TsModuleLocation("Test", new List <string> {
                "path1", "path2", "path3"
            });
            var location2 = new TsModuleLocation("Test", new List <string> {
                "path1", "path2", "path3"
            });
            var dictionary = new Dictionary <TsModuleLocation, string> {
                { location1, "whatever" }
            };

            Assert.IsTrue(dictionary.TryGetValue(location2, out _));
        }