tests

package
v0.0.0-...-1908aab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestProject = models.Project{
	PersonalWebsiteType: "Projects",
	SortValue:           "Project Title",
	Category:            "Software Engineering",
	Name:                "Personal Website",
	Description:         "My personal website created in the cloud",
	FeaturesDescription: "User is able to view my work",
	Role:                "Project Lead",
	Tasks:               []string{"Develop backend microservices"},
	TeamSize:            &teamSize,
	TeamRoles:           &teamRoles,
	CloudServices:       &cloudServices,
	Tools:               []string{"Go", "React"},
	Duration:            "6 Months",
	StartDate:           "Jan 2024",
	EndDate:             "Dec 2024",
	Notes:               &notes,
	Link:                &link,
	LinkType:            &linkType,
	MediaLink:           &mediaLink,
}

Project model used for test cases

View Source
var TestProjectItem = map[string]*dynamodb.AttributeValue{
	"personalWebsiteType": {S: aws.String("Projects")},
	"sortValue":           {S: aws.String("Project Title")},
	"category":            {S: aws.String("Software Engineering")},
	"name":                {S: aws.String("Personal Website")},
	"description":         {S: aws.String("My personal website created in the cloud")},
	"featuresDescription": {S: aws.String("User is able to view my work")},
	"role":                {S: aws.String("Project Lead")},
	"tasks":               {SS: aws.StringSlice([]string{"Develop backend microservices"})},
	"teamSize":            {N: aws.String("1")},
	"teamRoles":           {SS: aws.StringSlice([]string{"Backend Developer", "Frontend Developer"})},
	"cloudServices":       {SS: aws.StringSlice([]string{"AWS"})},
	"tools":               {SS: aws.StringSlice([]string{"Go", "React"})},
	"duration":            {S: aws.String("6 Months")},
	"startDate":           {S: aws.String("Jan 2024")},
	"endDate":             {S: aws.String("Dec 2024")},
	"notes":               {S: aws.String("Site is still in development stages")},
	"link":                {S: aws.String("http://my-url")},
	"linkType":            {S: aws.String("YouTube")},
	"mediaLink":           {S: aws.String("http://link-to-media-file")},
}

Project Item model used for dynamodb

View Source
var TestProjectItemNil = map[string]*dynamodb.AttributeValue{
	"personalWebsiteType": {S: aws.String("Projects")},
	"sortValue":           {S: aws.String("Project Title")},
	"category":            {S: aws.String("Software Engineering")},
	"name":                {S: aws.String("Personal Website")},
	"description":         {S: aws.String("My personal website created in the cloud")},
	"featuresDescription": {S: aws.String("User is able to view my work")},
	"role":                {S: aws.String("Project Lead")},
	"tasks":               {SS: aws.StringSlice([]string{"Develop backend microservices"})},
	"teamSize":            {NULL: aws.Bool(true)},
	"teamRoles":           {NULL: aws.Bool(true)},
	"cloudServices":       {NULL: aws.Bool(true)},
	"tools":               {SS: aws.StringSlice([]string{"Go", "React"})},
	"duration":            {S: aws.String("6 Months")},
	"startDate":           {S: aws.String("Jan 2024")},
	"endDate":             {S: aws.String("Dec 2024")},
	"notes":               {NULL: aws.Bool(true)},
	"link":                {NULL: aws.Bool(true)},
	"linkType":            {NULL: aws.Bool(true)},
	"mediaLink":           {NULL: aws.Bool(true)},
}

Project Item model used for dynamodb with empty values

View Source
var TestProjectNil = models.Project{
	PersonalWebsiteType: "Projects",
	SortValue:           "Project Title",
	Category:            "Software Engineering",
	Name:                "Personal Website",
	Description:         "My personal website created in the cloud",
	FeaturesDescription: "User is able to view my work",
	Role:                "Project Lead",
	Tasks:               []string{"Develop backend microservices"},
	TeamSize:            nil,
	TeamRoles:           nil,
	CloudServices:       nil,
	Tools:               []string{"Go", "React"},
	Duration:            "6 Months",
	StartDate:           "Jan 2024",
	EndDate:             "Dec 2024",
	Notes:               nil,
	Link:                nil,
	LinkType:            nil,
	MediaLink:           nil,
}

Project model used for test cases with empty values

View Source
var TestSkillsTools = models.SkillsTools{
	PersonalWebsiteType: "SkillsTools",
	SortValue:           "Tools",
	Categories: []models.Category{
		{
			Category: "Programming Languages",
			List:     []string{"C#", "Go", "Java", "JavaScript", "Python", "Swift"},
		},
		{
			Category: "Cloud Services",
			List:     []string{"AWS", "Azure", "Google Cloud Platform", "Digital Ocean"},
		},
	},
}

SkillsTools model used for test cases

View Source
var TestSkillsToolsItem = map[string]*dynamodb.AttributeValue{
	"personalWebsiteType": {S: aws.String("SkillsTools")},
	"sortValue":           {S: aws.String("Tools")},
	"categories": {
		L: categories,
	},
}
View Source
var TestWork = models.Work{
	PersonalWebsiteType: "Work",
	SortValue:           "2020-01-01",
	JobTitle:            "Software Engineer",
	Company:             "ABC Inc",
	Location: models.Location{
		City:  "New York",
		State: "NY",
	},
	StartDate:      "2020-01-01",
	EndDate:        "2020-12-31",
	JobRole:        "Backend Developer",
	JobDescription: []string{"Developed backend systems", "Optimized database queries"},
}

Work model used for test cases

View Source
var TestWorkItem = map[string]*dynamodb.AttributeValue{
	"personalWebsiteType": {S: aws.String("Work")},
	"sortValue":           {S: aws.String("2020-01-01")},
	"jobTitle":            {S: aws.String("Software Engineer")},
	"company":             {S: aws.String("ABC Inc")},
	"location": {
		M: map[string]*dynamodb.AttributeValue{
			"city":  {S: aws.String("New York")},
			"state": {S: aws.String("NY")},
		},
	},
	"startDate":      {S: aws.String("2020-01-01")},
	"endDate":        {S: aws.String("2020-12-31")},
	"jobRole":        {S: aws.String("Backend Developer")},
	"jobDescription": {SS: []*string{aws.String("Developed backend systems"), aws.String("Optimized database queries")}},
}

Work Item model used for dynamodb

Functions

func AssertProject

func AssertProject(t *testing.T, expectedProject models.Project, actualProject models.Project)

func AssertSkillsTools

func AssertSkillsTools(t *testing.T, expectedSkillsTools models.SkillsTools, actualSkillsTools models.SkillsTools)

func AssertWork

func AssertWork(t *testing.T, expectedWork models.Work, actualWork models.Work)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL