Beispiel #1
0
 def testIsSelectedItemHasPageIdAndParamsPageHasSameIdAndDifferentParams(
         self):
     item = NavigatorItem(pageId="hello", params={"text": "bonjour"})
     page = self.getPage("hello", {"param": "param"})
     result = item.isSelected(page)
     expectedResult = False
     self.assertEqual(expectedResult, result)
Beispiel #2
0
 def testIsSelectedItemHasPageIdNoParamsPageHasDifferentIdAndParams(self):
     item = NavigatorItem(pageId="hello")
     page = self.getPage("hej", {"param": "param"})
     result = item.isSelected(page)
     expectedResult = False
     self.assertEqual(expectedResult, result)
Beispiel #3
0
 def testIsSelectedItemHasNoPageIdNoParamsPageHasIdAndParams(self):
     item = NavigatorItem(url="http://sehicl.org.uk")
     page = self.getPage("hello", {"param": "param"})
     result = item.isSelected(page)
     expectedResult = False
     self.assertEqual(expectedResult, result)
Beispiel #4
0
 def testIsSelectedItemHasPageIdNoParamsPageHasSameIdNoParams(self):
     item = NavigatorItem(pageId="hello")
     page = self.getPage("hello")
     result = item.isSelected(page)
     expectedResult = True
     self.assertEqual(expectedResult, result)
Beispiel #5
0
 def testIsSelectedItemHasPageIdAndParamsPageHasNoIdNoParams(self):
     item = NavigatorItem(pageId="hello", params={"text": "bonjour"})
     page = self.getPage(None)
     result = item.isSelected(page)
     expectedResult = False
     self.assertEqual(expectedResult, result)
Beispiel #6
0
 def testIsSelectedItemHasPageIdNoParamsPageHasDifferentIdAndParams(self):
     item = NavigatorItem(pageId="hello")
     page = self.getPage("hej", {"param": "param"})
     result = item.isSelected(page)
     expectedResult = False
     self.assertEqual(expectedResult, result)
Beispiel #7
0
 def testIsSelectedItemHasNoPageIdNoParamsPageHasIdAndParams(self):
     item = NavigatorItem(url="http://sehicl.org.uk")
     page = self.getPage("hello", {"param": "param"})
     result = item.isSelected(page)
     expectedResult = False
     self.assertEqual(expectedResult, result)
Beispiel #8
0
 def testIsSelectedItemHasPageIdAndParamsPageHasNoIdAndParams(self):
     item = NavigatorItem(pageId="hello", params={"text": "bonjour"})
     page = self.getPage(None, {"param": "param"})
     result = item.isSelected(page)
     expectedResult = False
     self.assertEqual(expectedResult, result)
Beispiel #9
0
 def testIsSelectedItemHasPageIdNoParamsPageHasSameIdNoParams(self):
     item = NavigatorItem(pageId="hello")
     page = self.getPage("hello")
     result = item.isSelected(page)
     expectedResult = True
     self.assertEqual(expectedResult, result)
Beispiel #10
0
 def testIsSelectedItemHasPageIdAndParamsPageHasSameIdAndExtraParams(self):
     item = NavigatorItem(pageId="hello", params={"text": "bonjour"})
     page = self.getPage("hello", {"param": "param", "text": "bonjour"})
     result = item.isSelected(page)
     expectedResult = True
     self.assertEqual(expectedResult, result)